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
+3 -3
View File
@@ -26,7 +26,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/fission/fission"
"github.com/fission/fission/tpr"
"github.com/fission/fission/crd"
)
func (a *API) EnvironmentApiList(w http.ResponseWriter, r *http.Request) {
@@ -52,7 +52,7 @@ func (a *API) EnvironmentApiCreate(w http.ResponseWriter, r *http.Request) {
return
}
var env tpr.Environment
var env crd.Environment
err = json.Unmarshal(body, &env)
if err != nil {
log.Printf("Failed to unmarshal request body: [%v]", body)
@@ -115,7 +115,7 @@ func (a *API) EnvironmentApiUpdate(w http.ResponseWriter, r *http.Request) {
return
}
var env tpr.Environment
var env crd.Environment
err = json.Unmarshal(body, &env)
if err != nil {
a.respondWithError(w, err)