Switch from ThirdPartyResources to CustomResourceDefinitions (#381)

Switch Fission's storage over to the new CustomResourceDefinitions, from the deprecated ThirdPartyResources. This allows us to be compatible with Kubernets 1.8 and onwards.

This also adds a CLI tool for dumping state from an old fission version and restoring state into new CRDs.

The storage service is unaffected by this change.
This commit is contained in:
Ta-Ching Chen
2017-11-04 14:55:16 -07:00
committed by Soam Vasani
parent 746c51901d
commit 5f14b9b0ae
76 changed files with 1223 additions and 701 deletions
+4 -4
View File
@@ -22,17 +22,17 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/fission/fission/tpr"
"github.com/fission/fission/crd"
)
type (
TimerSync struct {
fissionClient *tpr.FissionClient
fissionClient *crd.FissionClient
timer *Timer
}
)
func MakeTimerSync(fissionClient *tpr.FissionClient, timer *Timer) *TimerSync {
func MakeTimerSync(fissionClient *crd.FissionClient, timer *Timer) *TimerSync {
ws := &TimerSync{
fissionClient: fissionClient,
timer: timer,
@@ -43,7 +43,7 @@ func MakeTimerSync(fissionClient *tpr.FissionClient, timer *Timer) *TimerSync {
func (ws *TimerSync) syncSvc() {
for {
triggers, err := ws.fissionClient.Timetriggers(metav1.NamespaceAll).List(metav1.ListOptions{})
triggers, err := ws.fissionClient.TimeTriggers(metav1.NamespaceAll).List(metav1.ListOptions{})
if err != nil {
log.Fatalf("Failed get time trigger list: %v", err)
}