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
+4
-4
@@ -37,9 +37,9 @@ import (
|
||||
|
||||
"github.com/fission/fission"
|
||||
"github.com/fission/fission/controller/client"
|
||||
"github.com/fission/fission/crd"
|
||||
"github.com/fission/fission/fission/logdb"
|
||||
storageSvcClient "github.com/fission/fission/storagesvc/client"
|
||||
"github.com/fission/fission/tpr"
|
||||
)
|
||||
|
||||
func fileSize(filePath string) int64 {
|
||||
@@ -113,7 +113,7 @@ func createPackage(client *client.Client, envName, srcArchiveName, deployArchive
|
||||
}
|
||||
|
||||
pkgName := strings.ToLower(uuid.NewV4().String())
|
||||
pkg := &tpr.Package{
|
||||
pkg := &crd.Package{
|
||||
Metadata: metav1.ObjectMeta{
|
||||
Name: pkgName,
|
||||
Namespace: metav1.NamespaceDefault,
|
||||
@@ -200,7 +200,7 @@ func fnCreate(c *cli.Context) error {
|
||||
|
||||
pkgMetadata := createPackage(client, envName, srcArchiveName, deployArchiveName, buildcmd)
|
||||
|
||||
function := &tpr.Function{
|
||||
function := &crd.Function{
|
||||
Metadata: metav1.ObjectMeta{
|
||||
Name: fnName,
|
||||
Namespace: metav1.NamespaceDefault,
|
||||
@@ -236,7 +236,7 @@ func fnCreate(c *cli.Context) error {
|
||||
method = "GET"
|
||||
}
|
||||
triggerName := uuid.NewV4().String()
|
||||
ht := &tpr.Httptrigger{
|
||||
ht := &crd.HTTPTrigger{
|
||||
Metadata: metav1.ObjectMeta{
|
||||
Name: triggerName,
|
||||
Namespace: metav1.NamespaceDefault,
|
||||
|
||||
Reference in New Issue
Block a user