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:
committed by
Soam Vasani
parent
746c51901d
commit
5f14b9b0ae
+3
-3
@@ -49,8 +49,8 @@ import (
|
||||
"github.com/gorilla/handlers"
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"github.com/fission/fission/crd"
|
||||
poolmgrClient "github.com/fission/fission/poolmgr/client"
|
||||
"github.com/fission/fission/tpr"
|
||||
)
|
||||
|
||||
// request url ---[mux]---> Function(name,uid) ----[fmap]----> k8s service url
|
||||
@@ -73,11 +73,11 @@ func serve(port int, httpTriggerSet *HTTPTriggerSet) {
|
||||
func Start(port int, poolmgrUrl string) {
|
||||
fmap := makeFunctionServiceMap(time.Minute)
|
||||
|
||||
fissionClient, _, err := tpr.MakeFissionClient()
|
||||
fissionClient, _, _, err := crd.MakeFissionClient()
|
||||
if err != nil {
|
||||
log.Fatalf("Error connecting to kubernetes API: %v", err)
|
||||
}
|
||||
restClient := fissionClient.GetTprClient()
|
||||
restClient := fissionClient.GetCrdClient()
|
||||
poolmgr := poolmgrClient.MakeClient(poolmgrUrl)
|
||||
resolver := makeFunctionReferenceResolver(fissionClient)
|
||||
resolver.Sync(restClient)
|
||||
|
||||
Reference in New Issue
Block a user