diff --git a/config/crds/kudo_v1alpha1_instance.yaml b/config/crds/kudo_v1beta1_instance.yaml similarity index 98% rename from config/crds/kudo_v1alpha1_instance.yaml rename to config/crds/kudo_v1beta1_instance.yaml index aaba6f45a..34980a290 100644 --- a/config/crds/kudo_v1alpha1_instance.yaml +++ b/config/crds/kudo_v1beta1_instance.yaml @@ -38,7 +38,7 @@ spec: type: object type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" diff --git a/config/crds/kudo_v1alpha1_operator.yaml b/config/crds/kudo_v1beta1_operator.yaml similarity index 98% rename from config/crds/kudo_v1alpha1_operator.yaml rename to config/crds/kudo_v1beta1_operator.yaml index 3424ae3e5..ba1c611a9 100644 --- a/config/crds/kudo_v1alpha1_operator.yaml +++ b/config/crds/kudo_v1beta1_operator.yaml @@ -45,7 +45,7 @@ spec: status: type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" diff --git a/config/crds/kudo_v1alpha1_operatorversion.yaml b/config/crds/kudo_v1beta1_operatorversion.yaml similarity index 99% rename from config/crds/kudo_v1alpha1_operatorversion.yaml rename to config/crds/kudo_v1beta1_operatorversion.yaml index dd170952d..50d6b8764 100644 --- a/config/crds/kudo_v1alpha1_operatorversion.yaml +++ b/config/crds/kudo_v1beta1_operatorversion.yaml @@ -90,7 +90,7 @@ spec: status: type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" diff --git a/config/crds/kudo_v1alpha1_teststep.yaml b/config/crds/kudo_v1beta1_teststep.yaml similarity index 99% rename from config/crds/kudo_v1alpha1_teststep.yaml rename to config/crds/kudo_v1beta1_teststep.yaml index 60843cdba..7e640ebab 100644 --- a/config/crds/kudo_v1alpha1_teststep.yaml +++ b/config/crds/kudo_v1beta1_teststep.yaml @@ -80,7 +80,7 @@ spec: required: - unitTest - kubectl - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" diff --git a/config/crds/kudo_v1alpha1_testsuite.yaml b/config/crds/kudo_v1beta1_testsuite.yaml similarity index 99% rename from config/crds/kudo_v1alpha1_testsuite.yaml rename to config/crds/kudo_v1beta1_testsuite.yaml index 32fa6dbcf..78dfc3a83 100644 --- a/config/crds/kudo_v1alpha1_testsuite.yaml +++ b/config/crds/kudo_v1beta1_testsuite.yaml @@ -96,7 +96,7 @@ spec: - parallel - artifactsDir - kubectl - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" diff --git a/config/scratch/mysql-backup.yaml b/config/scratch/mysql-backup.yaml index 334d8b923..b6b00089c 100644 --- a/config/scratch/mysql-backup.yaml +++ b/config/scratch/mysql-backup.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: PlanExecution metadata: labels: diff --git a/config/scratch/mysql-restore.yaml b/config/scratch/mysql-restore.yaml index e83461eb8..d9e65cad2 100644 --- a/config/scratch/mysql-restore.yaml +++ b/config/scratch/mysql-restore.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: PlanExecution metadata: labels: diff --git a/config/scratch/validation.yaml b/config/scratch/validation.yaml index f6ffcc740..ad3a73cfa 100644 --- a/config/scratch/validation.yaml +++ b/config/scratch/validation.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: PlanExecution metadata: labels: @@ -6,7 +6,7 @@ metadata: name: validation namespace: default ownerReferences: - - apiVersion: kudo.dev/v1alpha1 + - apiVersion: kudo.dev/v1beta1 blockOwnerDeletion: true controller: true kind: Instance diff --git a/hack/update_codegen.sh b/hack/update_codegen.sh index 927a3207e..0401714ad 100755 --- a/hack/update_codegen.sh +++ b/hack/update_codegen.sh @@ -22,5 +22,5 @@ fi all \ github.com/kudobuilder/kudo/pkg/client \ github.com/kudobuilder/kudo/pkg/apis \ - "kudo:v1alpha1" \ + "kudo:v1beta1" \ --go-header-file hack/boilerplate.go.txt # must be last for some reason diff --git a/keps/0008-operator-testing.md b/keps/0008-operator-testing.md index 067af5e26..5b8dd5951 100644 --- a/keps/0008-operator-testing.md +++ b/keps/0008-operator-testing.md @@ -250,7 +250,7 @@ When searching a test step file, if a `TestStep` object is found, it includes se ``` type TestStep struct { - // The type meta object, should always be a GVK of kudo.dev/v1alpha1/TestStep. + // The type meta object, should always be a GVK of kudo.dev/v1beta1/TestStep. TypeMeta // Override the default metadata. Set labels or override the test step name. ObjectMeta @@ -287,7 +287,7 @@ The `Delete` list can be used to specify objects to delete prior to running the A `TestStep` is also able to invoke kubectl commands or plugins by specifying a list of commands in the `kubectl` setting, e.g.: ``` -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - apply -f ./testdata/pod.yaml @@ -336,7 +336,7 @@ When searching the assertion file for a test step, if a `TestAssert` object is f ``` type TestAssert struct { - // The type meta object, should always be a GVK of kudo.dev/v1alpha1/TestAssert. + // The type meta object, should always be a GVK of kudo.dev/v1beta1/TestAssert. TypeMeta // Override the default timeout of 30 seconds (in seconds). Timeout int diff --git a/kudo-e2e-test.yaml b/kudo-e2e-test.yaml index 41d438059..e9a5ccb7e 100644 --- a/kudo-e2e-test.yaml +++ b/kudo-e2e-test.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestSuite crdDir: ./config/crds/ manifestDirs: diff --git a/kudo-test.yaml b/kudo-test.yaml index 2f44ab4ff..466a0bee7 100644 --- a/kudo-test.yaml +++ b/kudo-test.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestSuite crdDir: ./config/crds/ manifestDirs: diff --git a/pkg/apis/addtoscheme_kudo_v1alpha1.go b/pkg/apis/addtoscheme_kudo_v1alpha1.go index 21be1ed7f..6479a928d 100644 --- a/pkg/apis/addtoscheme_kudo_v1alpha1.go +++ b/pkg/apis/addtoscheme_kudo_v1alpha1.go @@ -15,9 +15,9 @@ limitations under the License. package apis -import "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" +import "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" func init() { // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back - AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme) + AddToSchemes = append(AddToSchemes, v1beta1.SchemeBuilder.AddToScheme) } diff --git a/pkg/apis/kudo/v1alpha1/doc.go b/pkg/apis/kudo/v1beta1/doc.go similarity index 87% rename from pkg/apis/kudo/v1alpha1/doc.go rename to pkg/apis/kudo/v1beta1/doc.go index 6f1a7659f..4afdd379c 100644 --- a/pkg/apis/kudo/v1alpha1/doc.go +++ b/pkg/apis/kudo/v1beta1/doc.go @@ -13,10 +13,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package v1alpha1 contains API Schema definitions for the kudo v1alpha1 API group +// Package v1beta1 contains API Schema definitions for the kudo v1beta1 API group // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package,register // +k8s:conversion-gen=github.com/kudobuilder/kudo/pkg/apis/kudo // +k8s:defaulter-gen=TypeMeta // +groupName=kudo.dev -package v1alpha1 +package v1beta1 diff --git a/pkg/apis/kudo/v1alpha1/instance_types.go b/pkg/apis/kudo/v1beta1/instance_types.go similarity index 99% rename from pkg/apis/kudo/v1alpha1/instance_types.go rename to pkg/apis/kudo/v1beta1/instance_types.go index a404b9d46..f82599240 100644 --- a/pkg/apis/kudo/v1alpha1/instance_types.go +++ b/pkg/apis/kudo/v1beta1/instance_types.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "encoding/json" diff --git a/pkg/apis/kudo/v1alpha1/instance_types_test.go b/pkg/apis/kudo/v1beta1/instance_types_test.go similarity index 99% rename from pkg/apis/kudo/v1alpha1/instance_types_test.go rename to pkg/apis/kudo/v1beta1/instance_types_test.go index 2af6a1ac9..b4fe53d14 100644 --- a/pkg/apis/kudo/v1alpha1/instance_types_test.go +++ b/pkg/apis/kudo/v1beta1/instance_types_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "testing" diff --git a/pkg/apis/kudo/v1alpha1/operator_types.go b/pkg/apis/kudo/v1beta1/operator_types.go similarity index 99% rename from pkg/apis/kudo/v1alpha1/operator_types.go rename to pkg/apis/kudo/v1beta1/operator_types.go index 5f0536ac2..6e2fdcbb3 100644 --- a/pkg/apis/kudo/v1alpha1/operator_types.go +++ b/pkg/apis/kudo/v1beta1/operator_types.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/apis/kudo/v1alpha1/operatorversion_types.go b/pkg/apis/kudo/v1beta1/operatorversion_types.go similarity index 99% rename from pkg/apis/kudo/v1alpha1/operatorversion_types.go rename to pkg/apis/kudo/v1beta1/operatorversion_types.go index 673fe9923..8b5385106 100644 --- a/pkg/apis/kudo/v1alpha1/operatorversion_types.go +++ b/pkg/apis/kudo/v1beta1/operatorversion_types.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( corev1 "k8s.io/api/core/v1" diff --git a/pkg/apis/kudo/v1alpha1/register.go b/pkg/apis/kudo/v1beta1/register.go similarity index 92% rename from pkg/apis/kudo/v1alpha1/register.go rename to pkg/apis/kudo/v1beta1/register.go index c8fe6908e..bc98b4e2d 100644 --- a/pkg/apis/kudo/v1alpha1/register.go +++ b/pkg/apis/kudo/v1beta1/register.go @@ -15,13 +15,13 @@ limitations under the License. // NOTE: Boilerplate only. Ignore this file. -// Package v1alpha1 contains API Schema definitions for the kudo v1alpha1 API group +// Package v1beta1 contains API Schema definitions for the kudo v1beta1 API group // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package,register // +k8s:conversion-gen=github.com/kudobuilder/kudo/pkg/apis/kudo // +k8s:defaulter-gen=TypeMeta // +groupName=kudo.dev -package v1alpha1 +package v1beta1 import ( "k8s.io/apimachinery/pkg/runtime/schema" @@ -30,7 +30,7 @@ import ( var ( // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: "kudo.dev", Version: "v1alpha1"} + SchemeGroupVersion = schema.GroupVersion{Group: "kudo.dev", Version: "v1beta1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} diff --git a/pkg/apis/kudo/v1alpha1/test_types.go b/pkg/apis/kudo/v1beta1/test_types.go similarity index 93% rename from pkg/apis/kudo/v1alpha1/test_types.go rename to pkg/apis/kudo/v1beta1/test_types.go index a55ea5ab4..3e5febf47 100644 --- a/pkg/apis/kudo/v1alpha1/test_types.go +++ b/pkg/apis/kudo/v1beta1/test_types.go @@ -1,4 +1,4 @@ -package v1alpha1 +package v1beta1 import ( corev1 "k8s.io/api/core/v1" @@ -9,7 +9,7 @@ import ( // TestSuite configures which tests should be loaded. type TestSuite struct { - // The type meta object, should always be a GVK of kudo.dev/v1alpha1/TestSuite. + // The type meta object, should always be a GVK of kudo.dev/v1beta1/TestSuite. metav1.TypeMeta `json:",inline"` // Set labels or the test suite name. metav1.ObjectMeta `json:"metadata,omitempty"` @@ -53,7 +53,7 @@ type TestSuite struct { // TestStep settings to apply to a test step. type TestStep struct { - // The type meta object, should always be a GVK of kudo.dev/v1alpha1/TestStep. + // The type meta object, should always be a GVK of kudo.dev/v1beta1/TestStep. metav1.TypeMeta `json:",inline"` // Override the default metadata. Set labels or override the test step name. metav1.ObjectMeta `json:"metadata,omitempty"` @@ -79,7 +79,7 @@ type TestStep struct { // TestAssert represents the settings needed to verify the result of a test step. type TestAssert struct { - // The type meta object, should always be a GVK of kudo.dev/v1alpha1/TestAssert. + // The type meta object, should always be a GVK of kudo.dev/v1beta1/TestAssert. metav1.TypeMeta `json:",inline"` // Override the default timeout of 30 seconds (in seconds). Timeout int `json:"timeout"` diff --git a/pkg/apis/kudo/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go similarity index 99% rename from pkg/apis/kudo/v1alpha1/zz_generated.deepcopy.go rename to pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go index ea724cb4c..938614806 100644 --- a/pkg/apis/kudo/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go @@ -16,7 +16,7 @@ limitations under the License. */ // Code generated by deepcopy-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index dab4c73bc..506eda930 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -19,7 +19,7 @@ package versioned import ( "fmt" - kudov1alpha1 "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/typed/kudo/v1alpha1" + kudov1beta1 "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/typed/kudo/v1beta1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -27,19 +27,19 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface - KudoV1alpha1() kudov1alpha1.KudoV1alpha1Interface + KudoV1beta1() kudov1beta1.KudoV1beta1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - kudoV1alpha1 *kudov1alpha1.KudoV1alpha1Client + kudoV1beta1 *kudov1beta1.KudoV1beta1Client } -// KudoV1alpha1 retrieves the KudoV1alpha1Client -func (c *Clientset) KudoV1alpha1() kudov1alpha1.KudoV1alpha1Interface { - return c.kudoV1alpha1 +// KudoV1beta1 retrieves the KudoV1beta1Client +func (c *Clientset) KudoV1beta1() kudov1beta1.KudoV1beta1Interface { + return c.kudoV1beta1 } // Discovery retrieves the DiscoveryClient @@ -63,7 +63,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error - cs.kudoV1alpha1, err = kudov1alpha1.NewForConfig(&configShallowCopy) + cs.kudoV1beta1, err = kudov1beta1.NewForConfig(&configShallowCopy) if err != nil { return nil, err } @@ -79,7 +79,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset - cs.kudoV1alpha1 = kudov1alpha1.NewForConfigOrDie(c) + cs.kudoV1beta1 = kudov1beta1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -88,7 +88,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset - cs.kudoV1alpha1 = kudov1alpha1.New(c) + cs.kudoV1beta1 = kudov1beta1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index cb13f10c5..73e40e262 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -18,8 +18,8 @@ package fake import ( clientset "github.com/kudobuilder/kudo/pkg/client/clientset/versioned" - kudov1alpha1 "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/typed/kudo/v1alpha1" - fakekudov1alpha1 "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake" + kudov1beta1 "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/typed/kudo/v1beta1" + fakekudov1beta1 "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/typed/kudo/v1beta1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -74,7 +74,7 @@ func (c *Clientset) Tracker() testing.ObjectTracker { var _ clientset.Interface = &Clientset{} -// KudoV1alpha1 retrieves the KudoV1alpha1Client -func (c *Clientset) KudoV1alpha1() kudov1alpha1.KudoV1alpha1Interface { - return &fakekudov1alpha1.FakeKudoV1alpha1{Fake: &c.Fake} +// KudoV1beta1 retrieves the KudoV1beta1Client +func (c *Clientset) KudoV1beta1() kudov1beta1.KudoV1beta1Interface { + return &fakekudov1beta1.FakeKudoV1beta1{Fake: &c.Fake} } diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index 415ba3ed0..e41c8654f 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - kudov1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudov1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -29,7 +29,7 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - kudov1alpha1.AddToScheme, + kudov1beta1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index f8a9f8c30..3fdadbab7 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -17,7 +17,7 @@ limitations under the License. package scheme import ( - kudov1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudov1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -29,7 +29,7 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - kudov1alpha1.AddToScheme, + kudov1beta1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/doc.go b/pkg/client/clientset/versioned/typed/kudo/v1beta1/doc.go similarity index 97% rename from pkg/client/clientset/versioned/typed/kudo/v1alpha1/doc.go rename to pkg/client/clientset/versioned/typed/kudo/v1beta1/doc.go index b5983ac19..b03352e81 100644 --- a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/doc.go +++ b/pkg/client/clientset/versioned/typed/kudo/v1beta1/doc.go @@ -15,4 +15,4 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. -package v1alpha1 +package v1beta1 diff --git a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/doc.go b/pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/doc.go similarity index 100% rename from pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/doc.go rename to pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/doc.go diff --git a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/fake_instance.go b/pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/fake_instance.go similarity index 73% rename from pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/fake_instance.go rename to pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/fake_instance.go index a2a71f7ab..562add68e 100644 --- a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/fake_instance.go +++ b/pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/fake_instance.go @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -28,29 +28,29 @@ import ( // FakeInstances implements InstanceInterface type FakeInstances struct { - Fake *FakeKudoV1alpha1 + Fake *FakeKudoV1beta1 ns string } -var instancesResource = schema.GroupVersionResource{Group: "kudo.dev", Version: "v1alpha1", Resource: "instances"} +var instancesResource = schema.GroupVersionResource{Group: "kudo.dev", Version: "v1beta1", Resource: "instances"} -var instancesKind = schema.GroupVersionKind{Group: "kudo.dev", Version: "v1alpha1", Kind: "Instance"} +var instancesKind = schema.GroupVersionKind{Group: "kudo.dev", Version: "v1beta1", Kind: "Instance"} // Get takes name of the instance, and returns the corresponding instance object, and an error if there is any. -func (c *FakeInstances) Get(name string, options v1.GetOptions) (result *v1alpha1.Instance, err error) { +func (c *FakeInstances) Get(name string, options v1.GetOptions) (result *v1beta1.Instance, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(instancesResource, c.ns, name), &v1alpha1.Instance{}) + Invokes(testing.NewGetAction(instancesResource, c.ns, name), &v1beta1.Instance{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Instance), err + return obj.(*v1beta1.Instance), err } // List takes label and field selectors, and returns the list of Instances that match those selectors. -func (c *FakeInstances) List(opts v1.ListOptions) (result *v1alpha1.InstanceList, err error) { +func (c *FakeInstances) List(opts v1.ListOptions) (result *v1beta1.InstanceList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(instancesResource, instancesKind, c.ns, opts), &v1alpha1.InstanceList{}) + Invokes(testing.NewListAction(instancesResource, instancesKind, c.ns, opts), &v1beta1.InstanceList{}) if obj == nil { return nil, err @@ -60,8 +60,8 @@ func (c *FakeInstances) List(opts v1.ListOptions) (result *v1alpha1.InstanceList if label == nil { label = labels.Everything() } - list := &v1alpha1.InstanceList{ListMeta: obj.(*v1alpha1.InstanceList).ListMeta} - for _, item := range obj.(*v1alpha1.InstanceList).Items { + list := &v1beta1.InstanceList{ListMeta: obj.(*v1beta1.InstanceList).ListMeta} + for _, item := range obj.(*v1beta1.InstanceList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +77,43 @@ func (c *FakeInstances) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a instance and creates it. Returns the server's representation of the instance, and an error, if there is any. -func (c *FakeInstances) Create(instance *v1alpha1.Instance) (result *v1alpha1.Instance, err error) { +func (c *FakeInstances) Create(instance *v1beta1.Instance) (result *v1beta1.Instance, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(instancesResource, c.ns, instance), &v1alpha1.Instance{}) + Invokes(testing.NewCreateAction(instancesResource, c.ns, instance), &v1beta1.Instance{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Instance), err + return obj.(*v1beta1.Instance), err } // Update takes the representation of a instance and updates it. Returns the server's representation of the instance, and an error, if there is any. -func (c *FakeInstances) Update(instance *v1alpha1.Instance) (result *v1alpha1.Instance, err error) { +func (c *FakeInstances) Update(instance *v1beta1.Instance) (result *v1beta1.Instance, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(instancesResource, c.ns, instance), &v1alpha1.Instance{}) + Invokes(testing.NewUpdateAction(instancesResource, c.ns, instance), &v1beta1.Instance{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Instance), err + return obj.(*v1beta1.Instance), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeInstances) UpdateStatus(instance *v1alpha1.Instance) (*v1alpha1.Instance, error) { +func (c *FakeInstances) UpdateStatus(instance *v1beta1.Instance) (*v1beta1.Instance, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(instancesResource, "status", c.ns, instance), &v1alpha1.Instance{}) + Invokes(testing.NewUpdateSubresourceAction(instancesResource, "status", c.ns, instance), &v1beta1.Instance{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Instance), err + return obj.(*v1beta1.Instance), err } // Delete takes name of the instance and deletes it. Returns an error if one occurs. func (c *FakeInstances) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(instancesResource, c.ns, name), &v1alpha1.Instance{}) + Invokes(testing.NewDeleteAction(instancesResource, c.ns, name), &v1beta1.Instance{}) return err } @@ -122,17 +122,17 @@ func (c *FakeInstances) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeInstances) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(instancesResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &v1alpha1.InstanceList{}) + _, err := c.Fake.Invokes(action, &v1beta1.InstanceList{}) return err } // Patch applies the patch and returns the patched instance. -func (c *FakeInstances) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Instance, err error) { +func (c *FakeInstances) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Instance, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(instancesResource, c.ns, name, pt, data, subresources...), &v1alpha1.Instance{}) + Invokes(testing.NewPatchSubresourceAction(instancesResource, c.ns, name, pt, data, subresources...), &v1beta1.Instance{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Instance), err + return obj.(*v1beta1.Instance), err } diff --git a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/fake_kudo_client.go b/pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/fake_kudo_client.go similarity index 68% rename from pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/fake_kudo_client.go rename to pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/fake_kudo_client.go index 0ef88bf16..7f34ed2dd 100644 --- a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/fake_kudo_client.go +++ b/pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/fake_kudo_client.go @@ -17,30 +17,30 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/typed/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/typed/kudo/v1beta1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeKudoV1alpha1 struct { +type FakeKudoV1beta1 struct { *testing.Fake } -func (c *FakeKudoV1alpha1) Instances(namespace string) v1alpha1.InstanceInterface { +func (c *FakeKudoV1beta1) Instances(namespace string) v1beta1.InstanceInterface { return &FakeInstances{c, namespace} } -func (c *FakeKudoV1alpha1) Operators(namespace string) v1alpha1.OperatorInterface { +func (c *FakeKudoV1beta1) Operators(namespace string) v1beta1.OperatorInterface { return &FakeOperators{c, namespace} } -func (c *FakeKudoV1alpha1) OperatorVersions(namespace string) v1alpha1.OperatorVersionInterface { +func (c *FakeKudoV1beta1) OperatorVersions(namespace string) v1beta1.OperatorVersionInterface { return &FakeOperatorVersions{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeKudoV1alpha1) RESTClient() rest.Interface { +func (c *FakeKudoV1beta1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/fake_operator.go b/pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/fake_operator.go similarity index 73% rename from pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/fake_operator.go rename to pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/fake_operator.go index 224713d09..45460d1d7 100644 --- a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/fake_operator.go +++ b/pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/fake_operator.go @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -28,29 +28,29 @@ import ( // FakeOperators implements OperatorInterface type FakeOperators struct { - Fake *FakeKudoV1alpha1 + Fake *FakeKudoV1beta1 ns string } -var operatorsResource = schema.GroupVersionResource{Group: "kudo.dev", Version: "v1alpha1", Resource: "operators"} +var operatorsResource = schema.GroupVersionResource{Group: "kudo.dev", Version: "v1beta1", Resource: "operators"} -var operatorsKind = schema.GroupVersionKind{Group: "kudo.dev", Version: "v1alpha1", Kind: "Operator"} +var operatorsKind = schema.GroupVersionKind{Group: "kudo.dev", Version: "v1beta1", Kind: "Operator"} // Get takes name of the operator, and returns the corresponding operator object, and an error if there is any. -func (c *FakeOperators) Get(name string, options v1.GetOptions) (result *v1alpha1.Operator, err error) { +func (c *FakeOperators) Get(name string, options v1.GetOptions) (result *v1beta1.Operator, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(operatorsResource, c.ns, name), &v1alpha1.Operator{}) + Invokes(testing.NewGetAction(operatorsResource, c.ns, name), &v1beta1.Operator{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Operator), err + return obj.(*v1beta1.Operator), err } // List takes label and field selectors, and returns the list of Operators that match those selectors. -func (c *FakeOperators) List(opts v1.ListOptions) (result *v1alpha1.OperatorList, err error) { +func (c *FakeOperators) List(opts v1.ListOptions) (result *v1beta1.OperatorList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(operatorsResource, operatorsKind, c.ns, opts), &v1alpha1.OperatorList{}) + Invokes(testing.NewListAction(operatorsResource, operatorsKind, c.ns, opts), &v1beta1.OperatorList{}) if obj == nil { return nil, err @@ -60,8 +60,8 @@ func (c *FakeOperators) List(opts v1.ListOptions) (result *v1alpha1.OperatorList if label == nil { label = labels.Everything() } - list := &v1alpha1.OperatorList{ListMeta: obj.(*v1alpha1.OperatorList).ListMeta} - for _, item := range obj.(*v1alpha1.OperatorList).Items { + list := &v1beta1.OperatorList{ListMeta: obj.(*v1beta1.OperatorList).ListMeta} + for _, item := range obj.(*v1beta1.OperatorList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +77,43 @@ func (c *FakeOperators) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a operator and creates it. Returns the server's representation of the operator, and an error, if there is any. -func (c *FakeOperators) Create(operator *v1alpha1.Operator) (result *v1alpha1.Operator, err error) { +func (c *FakeOperators) Create(operator *v1beta1.Operator) (result *v1beta1.Operator, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(operatorsResource, c.ns, operator), &v1alpha1.Operator{}) + Invokes(testing.NewCreateAction(operatorsResource, c.ns, operator), &v1beta1.Operator{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Operator), err + return obj.(*v1beta1.Operator), err } // Update takes the representation of a operator and updates it. Returns the server's representation of the operator, and an error, if there is any. -func (c *FakeOperators) Update(operator *v1alpha1.Operator) (result *v1alpha1.Operator, err error) { +func (c *FakeOperators) Update(operator *v1beta1.Operator) (result *v1beta1.Operator, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(operatorsResource, c.ns, operator), &v1alpha1.Operator{}) + Invokes(testing.NewUpdateAction(operatorsResource, c.ns, operator), &v1beta1.Operator{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Operator), err + return obj.(*v1beta1.Operator), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOperators) UpdateStatus(operator *v1alpha1.Operator) (*v1alpha1.Operator, error) { +func (c *FakeOperators) UpdateStatus(operator *v1beta1.Operator) (*v1beta1.Operator, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(operatorsResource, "status", c.ns, operator), &v1alpha1.Operator{}) + Invokes(testing.NewUpdateSubresourceAction(operatorsResource, "status", c.ns, operator), &v1beta1.Operator{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Operator), err + return obj.(*v1beta1.Operator), err } // Delete takes name of the operator and deletes it. Returns an error if one occurs. func (c *FakeOperators) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(operatorsResource, c.ns, name), &v1alpha1.Operator{}) + Invokes(testing.NewDeleteAction(operatorsResource, c.ns, name), &v1beta1.Operator{}) return err } @@ -122,17 +122,17 @@ func (c *FakeOperators) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeOperators) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(operatorsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &v1alpha1.OperatorList{}) + _, err := c.Fake.Invokes(action, &v1beta1.OperatorList{}) return err } // Patch applies the patch and returns the patched operator. -func (c *FakeOperators) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Operator, err error) { +func (c *FakeOperators) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Operator, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(operatorsResource, c.ns, name, pt, data, subresources...), &v1alpha1.Operator{}) + Invokes(testing.NewPatchSubresourceAction(operatorsResource, c.ns, name, pt, data, subresources...), &v1beta1.Operator{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Operator), err + return obj.(*v1beta1.Operator), err } diff --git a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/fake_operatorversion.go b/pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/fake_operatorversion.go similarity index 70% rename from pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/fake_operatorversion.go rename to pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/fake_operatorversion.go index 633d0aeee..679124ba4 100644 --- a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/fake/fake_operatorversion.go +++ b/pkg/client/clientset/versioned/typed/kudo/v1beta1/fake/fake_operatorversion.go @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -28,29 +28,29 @@ import ( // FakeOperatorVersions implements OperatorVersionInterface type FakeOperatorVersions struct { - Fake *FakeKudoV1alpha1 + Fake *FakeKudoV1beta1 ns string } -var operatorversionsResource = schema.GroupVersionResource{Group: "kudo.dev", Version: "v1alpha1", Resource: "operatorversions"} +var operatorversionsResource = schema.GroupVersionResource{Group: "kudo.dev", Version: "v1beta1", Resource: "operatorversions"} -var operatorversionsKind = schema.GroupVersionKind{Group: "kudo.dev", Version: "v1alpha1", Kind: "OperatorVersion"} +var operatorversionsKind = schema.GroupVersionKind{Group: "kudo.dev", Version: "v1beta1", Kind: "OperatorVersion"} // Get takes name of the operatorVersion, and returns the corresponding operatorVersion object, and an error if there is any. -func (c *FakeOperatorVersions) Get(name string, options v1.GetOptions) (result *v1alpha1.OperatorVersion, err error) { +func (c *FakeOperatorVersions) Get(name string, options v1.GetOptions) (result *v1beta1.OperatorVersion, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(operatorversionsResource, c.ns, name), &v1alpha1.OperatorVersion{}) + Invokes(testing.NewGetAction(operatorversionsResource, c.ns, name), &v1beta1.OperatorVersion{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.OperatorVersion), err + return obj.(*v1beta1.OperatorVersion), err } // List takes label and field selectors, and returns the list of OperatorVersions that match those selectors. -func (c *FakeOperatorVersions) List(opts v1.ListOptions) (result *v1alpha1.OperatorVersionList, err error) { +func (c *FakeOperatorVersions) List(opts v1.ListOptions) (result *v1beta1.OperatorVersionList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(operatorversionsResource, operatorversionsKind, c.ns, opts), &v1alpha1.OperatorVersionList{}) + Invokes(testing.NewListAction(operatorversionsResource, operatorversionsKind, c.ns, opts), &v1beta1.OperatorVersionList{}) if obj == nil { return nil, err @@ -60,8 +60,8 @@ func (c *FakeOperatorVersions) List(opts v1.ListOptions) (result *v1alpha1.Opera if label == nil { label = labels.Everything() } - list := &v1alpha1.OperatorVersionList{ListMeta: obj.(*v1alpha1.OperatorVersionList).ListMeta} - for _, item := range obj.(*v1alpha1.OperatorVersionList).Items { + list := &v1beta1.OperatorVersionList{ListMeta: obj.(*v1beta1.OperatorVersionList).ListMeta} + for _, item := range obj.(*v1beta1.OperatorVersionList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +77,43 @@ func (c *FakeOperatorVersions) Watch(opts v1.ListOptions) (watch.Interface, erro } // Create takes the representation of a operatorVersion and creates it. Returns the server's representation of the operatorVersion, and an error, if there is any. -func (c *FakeOperatorVersions) Create(operatorVersion *v1alpha1.OperatorVersion) (result *v1alpha1.OperatorVersion, err error) { +func (c *FakeOperatorVersions) Create(operatorVersion *v1beta1.OperatorVersion) (result *v1beta1.OperatorVersion, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(operatorversionsResource, c.ns, operatorVersion), &v1alpha1.OperatorVersion{}) + Invokes(testing.NewCreateAction(operatorversionsResource, c.ns, operatorVersion), &v1beta1.OperatorVersion{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.OperatorVersion), err + return obj.(*v1beta1.OperatorVersion), err } // Update takes the representation of a operatorVersion and updates it. Returns the server's representation of the operatorVersion, and an error, if there is any. -func (c *FakeOperatorVersions) Update(operatorVersion *v1alpha1.OperatorVersion) (result *v1alpha1.OperatorVersion, err error) { +func (c *FakeOperatorVersions) Update(operatorVersion *v1beta1.OperatorVersion) (result *v1beta1.OperatorVersion, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(operatorversionsResource, c.ns, operatorVersion), &v1alpha1.OperatorVersion{}) + Invokes(testing.NewUpdateAction(operatorversionsResource, c.ns, operatorVersion), &v1beta1.OperatorVersion{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.OperatorVersion), err + return obj.(*v1beta1.OperatorVersion), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOperatorVersions) UpdateStatus(operatorVersion *v1alpha1.OperatorVersion) (*v1alpha1.OperatorVersion, error) { +func (c *FakeOperatorVersions) UpdateStatus(operatorVersion *v1beta1.OperatorVersion) (*v1beta1.OperatorVersion, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(operatorversionsResource, "status", c.ns, operatorVersion), &v1alpha1.OperatorVersion{}) + Invokes(testing.NewUpdateSubresourceAction(operatorversionsResource, "status", c.ns, operatorVersion), &v1beta1.OperatorVersion{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.OperatorVersion), err + return obj.(*v1beta1.OperatorVersion), err } // Delete takes name of the operatorVersion and deletes it. Returns an error if one occurs. func (c *FakeOperatorVersions) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(operatorversionsResource, c.ns, name), &v1alpha1.OperatorVersion{}) + Invokes(testing.NewDeleteAction(operatorversionsResource, c.ns, name), &v1beta1.OperatorVersion{}) return err } @@ -122,17 +122,17 @@ func (c *FakeOperatorVersions) Delete(name string, options *v1.DeleteOptions) er func (c *FakeOperatorVersions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(operatorversionsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &v1alpha1.OperatorVersionList{}) + _, err := c.Fake.Invokes(action, &v1beta1.OperatorVersionList{}) return err } // Patch applies the patch and returns the patched operatorVersion. -func (c *FakeOperatorVersions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OperatorVersion, err error) { +func (c *FakeOperatorVersions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.OperatorVersion, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(operatorversionsResource, c.ns, name, pt, data, subresources...), &v1alpha1.OperatorVersion{}) + Invokes(testing.NewPatchSubresourceAction(operatorversionsResource, c.ns, name, pt, data, subresources...), &v1beta1.OperatorVersion{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.OperatorVersion), err + return obj.(*v1beta1.OperatorVersion), err } diff --git a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/generated_expansion.go b/pkg/client/clientset/versioned/typed/kudo/v1beta1/generated_expansion.go similarity index 97% rename from pkg/client/clientset/versioned/typed/kudo/v1alpha1/generated_expansion.go rename to pkg/client/clientset/versioned/typed/kudo/v1beta1/generated_expansion.go index 7afa3d569..e56f687ae 100644 --- a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/generated_expansion.go +++ b/pkg/client/clientset/versioned/typed/kudo/v1beta1/generated_expansion.go @@ -14,7 +14,7 @@ limitations under the License. */ // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 type InstanceExpansion interface{} diff --git a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/instance.go b/pkg/client/clientset/versioned/typed/kudo/v1beta1/instance.go similarity index 79% rename from pkg/client/clientset/versioned/typed/kudo/v1alpha1/instance.go rename to pkg/client/clientset/versioned/typed/kudo/v1beta1/instance.go index a0f18b278..84d9eabc4 100644 --- a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/instance.go +++ b/pkg/client/clientset/versioned/typed/kudo/v1beta1/instance.go @@ -14,12 +14,12 @@ limitations under the License. */ // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "time" - v1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" scheme "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -35,15 +35,15 @@ type InstancesGetter interface { // InstanceInterface has methods to work with Instance resources. type InstanceInterface interface { - Create(*v1alpha1.Instance) (*v1alpha1.Instance, error) - Update(*v1alpha1.Instance) (*v1alpha1.Instance, error) - UpdateStatus(*v1alpha1.Instance) (*v1alpha1.Instance, error) + Create(*v1beta1.Instance) (*v1beta1.Instance, error) + Update(*v1beta1.Instance) (*v1beta1.Instance, error) + UpdateStatus(*v1beta1.Instance) (*v1beta1.Instance, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.Instance, error) - List(opts v1.ListOptions) (*v1alpha1.InstanceList, error) + Get(name string, options v1.GetOptions) (*v1beta1.Instance, error) + List(opts v1.ListOptions) (*v1beta1.InstanceList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Instance, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Instance, err error) InstanceExpansion } @@ -54,7 +54,7 @@ type instances struct { } // newInstances returns a Instances -func newInstances(c *KudoV1alpha1Client, namespace string) *instances { +func newInstances(c *KudoV1beta1Client, namespace string) *instances { return &instances{ client: c.RESTClient(), ns: namespace, @@ -62,8 +62,8 @@ func newInstances(c *KudoV1alpha1Client, namespace string) *instances { } // Get takes name of the instance, and returns the corresponding instance object, and an error if there is any. -func (c *instances) Get(name string, options v1.GetOptions) (result *v1alpha1.Instance, err error) { - result = &v1alpha1.Instance{} +func (c *instances) Get(name string, options v1.GetOptions) (result *v1beta1.Instance, err error) { + result = &v1beta1.Instance{} err = c.client.Get(). Namespace(c.ns). Resource("instances"). @@ -75,12 +75,12 @@ func (c *instances) Get(name string, options v1.GetOptions) (result *v1alpha1.In } // List takes label and field selectors, and returns the list of Instances that match those selectors. -func (c *instances) List(opts v1.ListOptions) (result *v1alpha1.InstanceList, err error) { +func (c *instances) List(opts v1.ListOptions) (result *v1beta1.InstanceList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.InstanceList{} + result = &v1beta1.InstanceList{} err = c.client.Get(). Namespace(c.ns). Resource("instances"). @@ -107,8 +107,8 @@ func (c *instances) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a instance and creates it. Returns the server's representation of the instance, and an error, if there is any. -func (c *instances) Create(instance *v1alpha1.Instance) (result *v1alpha1.Instance, err error) { - result = &v1alpha1.Instance{} +func (c *instances) Create(instance *v1beta1.Instance) (result *v1beta1.Instance, err error) { + result = &v1beta1.Instance{} err = c.client.Post(). Namespace(c.ns). Resource("instances"). @@ -119,8 +119,8 @@ func (c *instances) Create(instance *v1alpha1.Instance) (result *v1alpha1.Instan } // Update takes the representation of a instance and updates it. Returns the server's representation of the instance, and an error, if there is any. -func (c *instances) Update(instance *v1alpha1.Instance) (result *v1alpha1.Instance, err error) { - result = &v1alpha1.Instance{} +func (c *instances) Update(instance *v1beta1.Instance) (result *v1beta1.Instance, err error) { + result = &v1beta1.Instance{} err = c.client.Put(). Namespace(c.ns). Resource("instances"). @@ -134,8 +134,8 @@ func (c *instances) Update(instance *v1alpha1.Instance) (result *v1alpha1.Instan // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *instances) UpdateStatus(instance *v1alpha1.Instance) (result *v1alpha1.Instance, err error) { - result = &v1alpha1.Instance{} +func (c *instances) UpdateStatus(instance *v1beta1.Instance) (result *v1beta1.Instance, err error) { + result = &v1beta1.Instance{} err = c.client.Put(). Namespace(c.ns). Resource("instances"). @@ -175,8 +175,8 @@ func (c *instances) DeleteCollection(options *v1.DeleteOptions, listOptions v1.L } // Patch applies the patch and returns the patched instance. -func (c *instances) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Instance, err error) { - result = &v1alpha1.Instance{} +func (c *instances) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Instance, err error) { + result = &v1beta1.Instance{} err = c.client.Patch(pt). Namespace(c.ns). Resource("instances"). diff --git a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/kudo_client.go b/pkg/client/clientset/versioned/typed/kudo/v1beta1/kudo_client.go similarity index 61% rename from pkg/client/clientset/versioned/typed/kudo/v1alpha1/kudo_client.go rename to pkg/client/clientset/versioned/typed/kudo/v1beta1/kudo_client.go index e8c2d34b2..28c430e7a 100644 --- a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/kudo_client.go +++ b/pkg/client/clientset/versioned/typed/kudo/v1beta1/kudo_client.go @@ -14,40 +14,40 @@ limitations under the License. */ // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( - v1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) -type KudoV1alpha1Interface interface { +type KudoV1beta1Interface interface { RESTClient() rest.Interface InstancesGetter OperatorsGetter OperatorVersionsGetter } -// KudoV1alpha1Client is used to interact with features provided by the kudo.dev group. -type KudoV1alpha1Client struct { +// KudoV1beta1Client is used to interact with features provided by the kudo.dev group. +type KudoV1beta1Client struct { restClient rest.Interface } -func (c *KudoV1alpha1Client) Instances(namespace string) InstanceInterface { +func (c *KudoV1beta1Client) Instances(namespace string) InstanceInterface { return newInstances(c, namespace) } -func (c *KudoV1alpha1Client) Operators(namespace string) OperatorInterface { +func (c *KudoV1beta1Client) Operators(namespace string) OperatorInterface { return newOperators(c, namespace) } -func (c *KudoV1alpha1Client) OperatorVersions(namespace string) OperatorVersionInterface { +func (c *KudoV1beta1Client) OperatorVersions(namespace string) OperatorVersionInterface { return newOperatorVersions(c, namespace) } -// NewForConfig creates a new KudoV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*KudoV1alpha1Client, error) { +// NewForConfig creates a new KudoV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*KudoV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -56,12 +56,12 @@ func NewForConfig(c *rest.Config) (*KudoV1alpha1Client, error) { if err != nil { return nil, err } - return &KudoV1alpha1Client{client}, nil + return &KudoV1beta1Client{client}, nil } -// NewForConfigOrDie creates a new KudoV1alpha1Client for the given config and +// NewForConfigOrDie creates a new KudoV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *KudoV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *KudoV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -69,13 +69,13 @@ func NewForConfigOrDie(c *rest.Config) *KudoV1alpha1Client { return client } -// New creates a new KudoV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *KudoV1alpha1Client { - return &KudoV1alpha1Client{c} +// New creates a new KudoV1beta1Client for the given RESTClient. +func New(c rest.Interface) *KudoV1beta1Client { + return &KudoV1beta1Client{c} } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := v1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() @@ -89,7 +89,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *KudoV1alpha1Client) RESTClient() rest.Interface { +func (c *KudoV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/operator.go b/pkg/client/clientset/versioned/typed/kudo/v1beta1/operator.go similarity index 79% rename from pkg/client/clientset/versioned/typed/kudo/v1alpha1/operator.go rename to pkg/client/clientset/versioned/typed/kudo/v1beta1/operator.go index c0d607995..62f087147 100644 --- a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/operator.go +++ b/pkg/client/clientset/versioned/typed/kudo/v1beta1/operator.go @@ -14,12 +14,12 @@ limitations under the License. */ // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "time" - v1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" scheme "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -35,15 +35,15 @@ type OperatorsGetter interface { // OperatorInterface has methods to work with Operator resources. type OperatorInterface interface { - Create(*v1alpha1.Operator) (*v1alpha1.Operator, error) - Update(*v1alpha1.Operator) (*v1alpha1.Operator, error) - UpdateStatus(*v1alpha1.Operator) (*v1alpha1.Operator, error) + Create(*v1beta1.Operator) (*v1beta1.Operator, error) + Update(*v1beta1.Operator) (*v1beta1.Operator, error) + UpdateStatus(*v1beta1.Operator) (*v1beta1.Operator, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.Operator, error) - List(opts v1.ListOptions) (*v1alpha1.OperatorList, error) + Get(name string, options v1.GetOptions) (*v1beta1.Operator, error) + List(opts v1.ListOptions) (*v1beta1.OperatorList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Operator, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Operator, err error) OperatorExpansion } @@ -54,7 +54,7 @@ type operators struct { } // newOperators returns a Operators -func newOperators(c *KudoV1alpha1Client, namespace string) *operators { +func newOperators(c *KudoV1beta1Client, namespace string) *operators { return &operators{ client: c.RESTClient(), ns: namespace, @@ -62,8 +62,8 @@ func newOperators(c *KudoV1alpha1Client, namespace string) *operators { } // Get takes name of the operator, and returns the corresponding operator object, and an error if there is any. -func (c *operators) Get(name string, options v1.GetOptions) (result *v1alpha1.Operator, err error) { - result = &v1alpha1.Operator{} +func (c *operators) Get(name string, options v1.GetOptions) (result *v1beta1.Operator, err error) { + result = &v1beta1.Operator{} err = c.client.Get(). Namespace(c.ns). Resource("operators"). @@ -75,12 +75,12 @@ func (c *operators) Get(name string, options v1.GetOptions) (result *v1alpha1.Op } // List takes label and field selectors, and returns the list of Operators that match those selectors. -func (c *operators) List(opts v1.ListOptions) (result *v1alpha1.OperatorList, err error) { +func (c *operators) List(opts v1.ListOptions) (result *v1beta1.OperatorList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.OperatorList{} + result = &v1beta1.OperatorList{} err = c.client.Get(). Namespace(c.ns). Resource("operators"). @@ -107,8 +107,8 @@ func (c *operators) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a operator and creates it. Returns the server's representation of the operator, and an error, if there is any. -func (c *operators) Create(operator *v1alpha1.Operator) (result *v1alpha1.Operator, err error) { - result = &v1alpha1.Operator{} +func (c *operators) Create(operator *v1beta1.Operator) (result *v1beta1.Operator, err error) { + result = &v1beta1.Operator{} err = c.client.Post(). Namespace(c.ns). Resource("operators"). @@ -119,8 +119,8 @@ func (c *operators) Create(operator *v1alpha1.Operator) (result *v1alpha1.Operat } // Update takes the representation of a operator and updates it. Returns the server's representation of the operator, and an error, if there is any. -func (c *operators) Update(operator *v1alpha1.Operator) (result *v1alpha1.Operator, err error) { - result = &v1alpha1.Operator{} +func (c *operators) Update(operator *v1beta1.Operator) (result *v1beta1.Operator, err error) { + result = &v1beta1.Operator{} err = c.client.Put(). Namespace(c.ns). Resource("operators"). @@ -134,8 +134,8 @@ func (c *operators) Update(operator *v1alpha1.Operator) (result *v1alpha1.Operat // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *operators) UpdateStatus(operator *v1alpha1.Operator) (result *v1alpha1.Operator, err error) { - result = &v1alpha1.Operator{} +func (c *operators) UpdateStatus(operator *v1beta1.Operator) (result *v1beta1.Operator, err error) { + result = &v1beta1.Operator{} err = c.client.Put(). Namespace(c.ns). Resource("operators"). @@ -175,8 +175,8 @@ func (c *operators) DeleteCollection(options *v1.DeleteOptions, listOptions v1.L } // Patch applies the patch and returns the patched operator. -func (c *operators) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Operator, err error) { - result = &v1alpha1.Operator{} +func (c *operators) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Operator, err error) { + result = &v1beta1.Operator{} err = c.client.Patch(pt). Namespace(c.ns). Resource("operators"). diff --git a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/operatorversion.go b/pkg/client/clientset/versioned/typed/kudo/v1beta1/operatorversion.go similarity index 78% rename from pkg/client/clientset/versioned/typed/kudo/v1alpha1/operatorversion.go rename to pkg/client/clientset/versioned/typed/kudo/v1beta1/operatorversion.go index 08568cfc3..880580212 100644 --- a/pkg/client/clientset/versioned/typed/kudo/v1alpha1/operatorversion.go +++ b/pkg/client/clientset/versioned/typed/kudo/v1beta1/operatorversion.go @@ -14,12 +14,12 @@ limitations under the License. */ // Code generated by client-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( "time" - v1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" scheme "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -35,15 +35,15 @@ type OperatorVersionsGetter interface { // OperatorVersionInterface has methods to work with OperatorVersion resources. type OperatorVersionInterface interface { - Create(*v1alpha1.OperatorVersion) (*v1alpha1.OperatorVersion, error) - Update(*v1alpha1.OperatorVersion) (*v1alpha1.OperatorVersion, error) - UpdateStatus(*v1alpha1.OperatorVersion) (*v1alpha1.OperatorVersion, error) + Create(*v1beta1.OperatorVersion) (*v1beta1.OperatorVersion, error) + Update(*v1beta1.OperatorVersion) (*v1beta1.OperatorVersion, error) + UpdateStatus(*v1beta1.OperatorVersion) (*v1beta1.OperatorVersion, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.OperatorVersion, error) - List(opts v1.ListOptions) (*v1alpha1.OperatorVersionList, error) + Get(name string, options v1.GetOptions) (*v1beta1.OperatorVersion, error) + List(opts v1.ListOptions) (*v1beta1.OperatorVersionList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OperatorVersion, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.OperatorVersion, err error) OperatorVersionExpansion } @@ -54,7 +54,7 @@ type operatorVersions struct { } // newOperatorVersions returns a OperatorVersions -func newOperatorVersions(c *KudoV1alpha1Client, namespace string) *operatorVersions { +func newOperatorVersions(c *KudoV1beta1Client, namespace string) *operatorVersions { return &operatorVersions{ client: c.RESTClient(), ns: namespace, @@ -62,8 +62,8 @@ func newOperatorVersions(c *KudoV1alpha1Client, namespace string) *operatorVersi } // Get takes name of the operatorVersion, and returns the corresponding operatorVersion object, and an error if there is any. -func (c *operatorVersions) Get(name string, options v1.GetOptions) (result *v1alpha1.OperatorVersion, err error) { - result = &v1alpha1.OperatorVersion{} +func (c *operatorVersions) Get(name string, options v1.GetOptions) (result *v1beta1.OperatorVersion, err error) { + result = &v1beta1.OperatorVersion{} err = c.client.Get(). Namespace(c.ns). Resource("operatorversions"). @@ -75,12 +75,12 @@ func (c *operatorVersions) Get(name string, options v1.GetOptions) (result *v1al } // List takes label and field selectors, and returns the list of OperatorVersions that match those selectors. -func (c *operatorVersions) List(opts v1.ListOptions) (result *v1alpha1.OperatorVersionList, err error) { +func (c *operatorVersions) List(opts v1.ListOptions) (result *v1beta1.OperatorVersionList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } - result = &v1alpha1.OperatorVersionList{} + result = &v1beta1.OperatorVersionList{} err = c.client.Get(). Namespace(c.ns). Resource("operatorversions"). @@ -107,8 +107,8 @@ func (c *operatorVersions) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a operatorVersion and creates it. Returns the server's representation of the operatorVersion, and an error, if there is any. -func (c *operatorVersions) Create(operatorVersion *v1alpha1.OperatorVersion) (result *v1alpha1.OperatorVersion, err error) { - result = &v1alpha1.OperatorVersion{} +func (c *operatorVersions) Create(operatorVersion *v1beta1.OperatorVersion) (result *v1beta1.OperatorVersion, err error) { + result = &v1beta1.OperatorVersion{} err = c.client.Post(). Namespace(c.ns). Resource("operatorversions"). @@ -119,8 +119,8 @@ func (c *operatorVersions) Create(operatorVersion *v1alpha1.OperatorVersion) (re } // Update takes the representation of a operatorVersion and updates it. Returns the server's representation of the operatorVersion, and an error, if there is any. -func (c *operatorVersions) Update(operatorVersion *v1alpha1.OperatorVersion) (result *v1alpha1.OperatorVersion, err error) { - result = &v1alpha1.OperatorVersion{} +func (c *operatorVersions) Update(operatorVersion *v1beta1.OperatorVersion) (result *v1beta1.OperatorVersion, err error) { + result = &v1beta1.OperatorVersion{} err = c.client.Put(). Namespace(c.ns). Resource("operatorversions"). @@ -134,8 +134,8 @@ func (c *operatorVersions) Update(operatorVersion *v1alpha1.OperatorVersion) (re // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *operatorVersions) UpdateStatus(operatorVersion *v1alpha1.OperatorVersion) (result *v1alpha1.OperatorVersion, err error) { - result = &v1alpha1.OperatorVersion{} +func (c *operatorVersions) UpdateStatus(operatorVersion *v1beta1.OperatorVersion) (result *v1beta1.OperatorVersion, err error) { + result = &v1beta1.OperatorVersion{} err = c.client.Put(). Namespace(c.ns). Resource("operatorversions"). @@ -175,8 +175,8 @@ func (c *operatorVersions) DeleteCollection(options *v1.DeleteOptions, listOptio } // Patch applies the patch and returns the patched operatorVersion. -func (c *operatorVersions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OperatorVersion, err error) { - result = &v1alpha1.OperatorVersion{} +func (c *operatorVersions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.OperatorVersion, err error) { + result = &v1beta1.OperatorVersion{} err = c.client.Patch(pt). Namespace(c.ns). Resource("operatorversions"). diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index d12f8a219..7d2176909 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -19,7 +19,7 @@ package externalversions import ( "fmt" - v1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -50,13 +50,13 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=kudo.dev, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("instances"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kudo().V1alpha1().Instances().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("operators"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kudo().V1alpha1().Operators().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("operatorversions"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Kudo().V1alpha1().OperatorVersions().Informer()}, nil + // Group=kudo.dev, Version=v1beta1 + case v1beta1.SchemeGroupVersion.WithResource("instances"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Kudo().V1beta1().Instances().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("operators"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Kudo().V1beta1().Operators().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("operatorversions"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Kudo().V1beta1().OperatorVersions().Informer()}, nil } diff --git a/pkg/client/informers/externalversions/kudo/interface.go b/pkg/client/informers/externalversions/kudo/interface.go index 069cc8704..56322435a 100644 --- a/pkg/client/informers/externalversions/kudo/interface.go +++ b/pkg/client/informers/externalversions/kudo/interface.go @@ -18,13 +18,13 @@ package kudo import ( internalinterfaces "github.com/kudobuilder/kudo/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kudobuilder/kudo/pkg/client/informers/externalversions/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/client/informers/externalversions/kudo/v1beta1" ) // Interface provides access to each of this group's versions. type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface } type group struct { @@ -38,7 +38,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) } diff --git a/pkg/client/informers/externalversions/kudo/v1alpha1/instance.go b/pkg/client/informers/externalversions/kudo/v1beta1/instance.go similarity index 84% rename from pkg/client/informers/externalversions/kudo/v1alpha1/instance.go rename to pkg/client/informers/externalversions/kudo/v1beta1/instance.go index 2f9a4f231..81a8167a3 100644 --- a/pkg/client/informers/externalversions/kudo/v1alpha1/instance.go +++ b/pkg/client/informers/externalversions/kudo/v1beta1/instance.go @@ -14,15 +14,15 @@ limitations under the License. */ // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( time "time" - kudov1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudov1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" versioned "github.com/kudobuilder/kudo/pkg/client/clientset/versioned" internalinterfaces "github.com/kudobuilder/kudo/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kudobuilder/kudo/pkg/client/listers/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/client/listers/kudo/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -33,7 +33,7 @@ import ( // Instances. type InstanceInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.InstanceLister + Lister() v1beta1.InstanceLister } type instanceInformer struct { @@ -59,16 +59,16 @@ func NewFilteredInstanceInformer(client versioned.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.KudoV1alpha1().Instances(namespace).List(options) + return client.KudoV1beta1().Instances(namespace).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KudoV1alpha1().Instances(namespace).Watch(options) + return client.KudoV1beta1().Instances(namespace).Watch(options) }, }, - &kudov1alpha1.Instance{}, + &kudov1beta1.Instance{}, resyncPeriod, indexers, ) @@ -79,9 +79,9 @@ func (f *instanceInformer) defaultInformer(client versioned.Interface, resyncPer } func (f *instanceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kudov1alpha1.Instance{}, f.defaultInformer) + return f.factory.InformerFor(&kudov1beta1.Instance{}, f.defaultInformer) } -func (f *instanceInformer) Lister() v1alpha1.InstanceLister { - return v1alpha1.NewInstanceLister(f.Informer().GetIndexer()) +func (f *instanceInformer) Lister() v1beta1.InstanceLister { + return v1beta1.NewInstanceLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/kudo/v1alpha1/interface.go b/pkg/client/informers/externalversions/kudo/v1beta1/interface.go similarity index 99% rename from pkg/client/informers/externalversions/kudo/v1alpha1/interface.go rename to pkg/client/informers/externalversions/kudo/v1beta1/interface.go index 30bb74ce0..80936a3b2 100644 --- a/pkg/client/informers/externalversions/kudo/v1alpha1/interface.go +++ b/pkg/client/informers/externalversions/kudo/v1beta1/interface.go @@ -14,7 +14,7 @@ limitations under the License. */ // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( internalinterfaces "github.com/kudobuilder/kudo/pkg/client/informers/externalversions/internalinterfaces" diff --git a/pkg/client/informers/externalversions/kudo/v1alpha1/operator.go b/pkg/client/informers/externalversions/kudo/v1beta1/operator.go similarity index 84% rename from pkg/client/informers/externalversions/kudo/v1alpha1/operator.go rename to pkg/client/informers/externalversions/kudo/v1beta1/operator.go index a1e857112..b8d660229 100644 --- a/pkg/client/informers/externalversions/kudo/v1alpha1/operator.go +++ b/pkg/client/informers/externalversions/kudo/v1beta1/operator.go @@ -14,15 +14,15 @@ limitations under the License. */ // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( time "time" - kudov1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudov1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" versioned "github.com/kudobuilder/kudo/pkg/client/clientset/versioned" internalinterfaces "github.com/kudobuilder/kudo/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kudobuilder/kudo/pkg/client/listers/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/client/listers/kudo/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -33,7 +33,7 @@ import ( // Operators. type OperatorInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.OperatorLister + Lister() v1beta1.OperatorLister } type operatorInformer struct { @@ -59,16 +59,16 @@ func NewFilteredOperatorInformer(client versioned.Interface, namespace string, r if tweakListOptions != nil { tweakListOptions(&options) } - return client.KudoV1alpha1().Operators(namespace).List(options) + return client.KudoV1beta1().Operators(namespace).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KudoV1alpha1().Operators(namespace).Watch(options) + return client.KudoV1beta1().Operators(namespace).Watch(options) }, }, - &kudov1alpha1.Operator{}, + &kudov1beta1.Operator{}, resyncPeriod, indexers, ) @@ -79,9 +79,9 @@ func (f *operatorInformer) defaultInformer(client versioned.Interface, resyncPer } func (f *operatorInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kudov1alpha1.Operator{}, f.defaultInformer) + return f.factory.InformerFor(&kudov1beta1.Operator{}, f.defaultInformer) } -func (f *operatorInformer) Lister() v1alpha1.OperatorLister { - return v1alpha1.NewOperatorLister(f.Informer().GetIndexer()) +func (f *operatorInformer) Lister() v1beta1.OperatorLister { + return v1beta1.NewOperatorLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/informers/externalversions/kudo/v1alpha1/operatorversion.go b/pkg/client/informers/externalversions/kudo/v1beta1/operatorversion.go similarity index 83% rename from pkg/client/informers/externalversions/kudo/v1alpha1/operatorversion.go rename to pkg/client/informers/externalversions/kudo/v1beta1/operatorversion.go index 7d191cb22..91e824e18 100644 --- a/pkg/client/informers/externalversions/kudo/v1alpha1/operatorversion.go +++ b/pkg/client/informers/externalversions/kudo/v1beta1/operatorversion.go @@ -14,15 +14,15 @@ limitations under the License. */ // Code generated by informer-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( time "time" - kudov1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudov1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" versioned "github.com/kudobuilder/kudo/pkg/client/clientset/versioned" internalinterfaces "github.com/kudobuilder/kudo/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kudobuilder/kudo/pkg/client/listers/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/client/listers/kudo/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -33,7 +33,7 @@ import ( // OperatorVersions. type OperatorVersionInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.OperatorVersionLister + Lister() v1beta1.OperatorVersionLister } type operatorVersionInformer struct { @@ -59,16 +59,16 @@ func NewFilteredOperatorVersionInformer(client versioned.Interface, namespace st if tweakListOptions != nil { tweakListOptions(&options) } - return client.KudoV1alpha1().OperatorVersions(namespace).List(options) + return client.KudoV1beta1().OperatorVersions(namespace).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KudoV1alpha1().OperatorVersions(namespace).Watch(options) + return client.KudoV1beta1().OperatorVersions(namespace).Watch(options) }, }, - &kudov1alpha1.OperatorVersion{}, + &kudov1beta1.OperatorVersion{}, resyncPeriod, indexers, ) @@ -79,9 +79,9 @@ func (f *operatorVersionInformer) defaultInformer(client versioned.Interface, re } func (f *operatorVersionInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kudov1alpha1.OperatorVersion{}, f.defaultInformer) + return f.factory.InformerFor(&kudov1beta1.OperatorVersion{}, f.defaultInformer) } -func (f *operatorVersionInformer) Lister() v1alpha1.OperatorVersionLister { - return v1alpha1.NewOperatorVersionLister(f.Informer().GetIndexer()) +func (f *operatorVersionInformer) Lister() v1beta1.OperatorVersionLister { + return v1beta1.NewOperatorVersionLister(f.Informer().GetIndexer()) } diff --git a/pkg/client/listers/kudo/v1alpha1/expansion_generated.go b/pkg/client/listers/kudo/v1beta1/expansion_generated.go similarity index 98% rename from pkg/client/listers/kudo/v1alpha1/expansion_generated.go rename to pkg/client/listers/kudo/v1beta1/expansion_generated.go index 36477d24b..8a7ad572c 100644 --- a/pkg/client/listers/kudo/v1alpha1/expansion_generated.go +++ b/pkg/client/listers/kudo/v1beta1/expansion_generated.go @@ -14,7 +14,7 @@ limitations under the License. */ // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 // InstanceListerExpansion allows custom methods to be added to // InstanceLister. diff --git a/pkg/client/listers/kudo/v1alpha1/instance.go b/pkg/client/listers/kudo/v1beta1/instance.go similarity index 80% rename from pkg/client/listers/kudo/v1alpha1/instance.go rename to pkg/client/listers/kudo/v1beta1/instance.go index 0e5ece3dc..c430e4d59 100644 --- a/pkg/client/listers/kudo/v1alpha1/instance.go +++ b/pkg/client/listers/kudo/v1beta1/instance.go @@ -14,10 +14,10 @@ limitations under the License. */ // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( - v1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -26,7 +26,7 @@ import ( // InstanceLister helps list Instances. type InstanceLister interface { // List lists all Instances in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.Instance, err error) + List(selector labels.Selector) (ret []*v1beta1.Instance, err error) // Instances returns an object that can list and get Instances. Instances(namespace string) InstanceNamespaceLister InstanceListerExpansion @@ -43,9 +43,9 @@ func NewInstanceLister(indexer cache.Indexer) InstanceLister { } // List lists all Instances in the indexer. -func (s *instanceLister) List(selector labels.Selector) (ret []*v1alpha1.Instance, err error) { +func (s *instanceLister) List(selector labels.Selector) (ret []*v1beta1.Instance, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.Instance)) + ret = append(ret, m.(*v1beta1.Instance)) }) return ret, err } @@ -58,9 +58,9 @@ func (s *instanceLister) Instances(namespace string) InstanceNamespaceLister { // InstanceNamespaceLister helps list and get Instances. type InstanceNamespaceLister interface { // List lists all Instances in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1alpha1.Instance, err error) + List(selector labels.Selector) (ret []*v1beta1.Instance, err error) // Get retrieves the Instance from the indexer for a given namespace and name. - Get(name string) (*v1alpha1.Instance, error) + Get(name string) (*v1beta1.Instance, error) InstanceNamespaceListerExpansion } @@ -72,21 +72,21 @@ type instanceNamespaceLister struct { } // List lists all Instances in the indexer for a given namespace. -func (s instanceNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Instance, err error) { +func (s instanceNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Instance, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.Instance)) + ret = append(ret, m.(*v1beta1.Instance)) }) return ret, err } // Get retrieves the Instance from the indexer for a given namespace and name. -func (s instanceNamespaceLister) Get(name string) (*v1alpha1.Instance, error) { +func (s instanceNamespaceLister) Get(name string) (*v1beta1.Instance, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("instance"), name) + return nil, errors.NewNotFound(v1beta1.Resource("instance"), name) } - return obj.(*v1alpha1.Instance), nil + return obj.(*v1beta1.Instance), nil } diff --git a/pkg/client/listers/kudo/v1alpha1/operator.go b/pkg/client/listers/kudo/v1beta1/operator.go similarity index 80% rename from pkg/client/listers/kudo/v1alpha1/operator.go rename to pkg/client/listers/kudo/v1beta1/operator.go index 0d7260038..7b59d334b 100644 --- a/pkg/client/listers/kudo/v1alpha1/operator.go +++ b/pkg/client/listers/kudo/v1beta1/operator.go @@ -14,10 +14,10 @@ limitations under the License. */ // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( - v1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -26,7 +26,7 @@ import ( // OperatorLister helps list Operators. type OperatorLister interface { // List lists all Operators in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.Operator, err error) + List(selector labels.Selector) (ret []*v1beta1.Operator, err error) // Operators returns an object that can list and get Operators. Operators(namespace string) OperatorNamespaceLister OperatorListerExpansion @@ -43,9 +43,9 @@ func NewOperatorLister(indexer cache.Indexer) OperatorLister { } // List lists all Operators in the indexer. -func (s *operatorLister) List(selector labels.Selector) (ret []*v1alpha1.Operator, err error) { +func (s *operatorLister) List(selector labels.Selector) (ret []*v1beta1.Operator, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.Operator)) + ret = append(ret, m.(*v1beta1.Operator)) }) return ret, err } @@ -58,9 +58,9 @@ func (s *operatorLister) Operators(namespace string) OperatorNamespaceLister { // OperatorNamespaceLister helps list and get Operators. type OperatorNamespaceLister interface { // List lists all Operators in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1alpha1.Operator, err error) + List(selector labels.Selector) (ret []*v1beta1.Operator, err error) // Get retrieves the Operator from the indexer for a given namespace and name. - Get(name string) (*v1alpha1.Operator, error) + Get(name string) (*v1beta1.Operator, error) OperatorNamespaceListerExpansion } @@ -72,21 +72,21 @@ type operatorNamespaceLister struct { } // List lists all Operators in the indexer for a given namespace. -func (s operatorNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Operator, err error) { +func (s operatorNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Operator, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.Operator)) + ret = append(ret, m.(*v1beta1.Operator)) }) return ret, err } // Get retrieves the Operator from the indexer for a given namespace and name. -func (s operatorNamespaceLister) Get(name string) (*v1alpha1.Operator, error) { +func (s operatorNamespaceLister) Get(name string) (*v1beta1.Operator, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("operator"), name) + return nil, errors.NewNotFound(v1beta1.Resource("operator"), name) } - return obj.(*v1alpha1.Operator), nil + return obj.(*v1beta1.Operator), nil } diff --git a/pkg/client/listers/kudo/v1alpha1/operatorversion.go b/pkg/client/listers/kudo/v1beta1/operatorversion.go similarity index 79% rename from pkg/client/listers/kudo/v1alpha1/operatorversion.go rename to pkg/client/listers/kudo/v1beta1/operatorversion.go index 8f2b0a9f4..3a5ccb55e 100644 --- a/pkg/client/listers/kudo/v1alpha1/operatorversion.go +++ b/pkg/client/listers/kudo/v1beta1/operatorversion.go @@ -14,10 +14,10 @@ limitations under the License. */ // Code generated by lister-gen. DO NOT EDIT. -package v1alpha1 +package v1beta1 import ( - v1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + v1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" @@ -26,7 +26,7 @@ import ( // OperatorVersionLister helps list OperatorVersions. type OperatorVersionLister interface { // List lists all OperatorVersions in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.OperatorVersion, err error) + List(selector labels.Selector) (ret []*v1beta1.OperatorVersion, err error) // OperatorVersions returns an object that can list and get OperatorVersions. OperatorVersions(namespace string) OperatorVersionNamespaceLister OperatorVersionListerExpansion @@ -43,9 +43,9 @@ func NewOperatorVersionLister(indexer cache.Indexer) OperatorVersionLister { } // List lists all OperatorVersions in the indexer. -func (s *operatorVersionLister) List(selector labels.Selector) (ret []*v1alpha1.OperatorVersion, err error) { +func (s *operatorVersionLister) List(selector labels.Selector) (ret []*v1beta1.OperatorVersion, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.OperatorVersion)) + ret = append(ret, m.(*v1beta1.OperatorVersion)) }) return ret, err } @@ -58,9 +58,9 @@ func (s *operatorVersionLister) OperatorVersions(namespace string) OperatorVersi // OperatorVersionNamespaceLister helps list and get OperatorVersions. type OperatorVersionNamespaceLister interface { // List lists all OperatorVersions in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1alpha1.OperatorVersion, err error) + List(selector labels.Selector) (ret []*v1beta1.OperatorVersion, err error) // Get retrieves the OperatorVersion from the indexer for a given namespace and name. - Get(name string) (*v1alpha1.OperatorVersion, error) + Get(name string) (*v1beta1.OperatorVersion, error) OperatorVersionNamespaceListerExpansion } @@ -72,21 +72,21 @@ type operatorVersionNamespaceLister struct { } // List lists all OperatorVersions in the indexer for a given namespace. -func (s operatorVersionNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.OperatorVersion, err error) { +func (s operatorVersionNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.OperatorVersion, err error) { err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.OperatorVersion)) + ret = append(ret, m.(*v1beta1.OperatorVersion)) }) return ret, err } // Get retrieves the OperatorVersion from the indexer for a given namespace and name. -func (s operatorVersionNamespaceLister) Get(name string) (*v1alpha1.OperatorVersion, error) { +func (s operatorVersionNamespaceLister) Get(name string) (*v1beta1.OperatorVersion, error) { obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("operatorversion"), name) + return nil, errors.NewNotFound(v1beta1.Resource("operatorversion"), name) } - return obj.(*v1alpha1.OperatorVersion), nil + return obj.(*v1beta1.OperatorVersion), nil } diff --git a/pkg/controller/instance/instance_controller.go b/pkg/controller/instance/instance_controller.go index d63fbe18a..8900eb500 100644 --- a/pkg/controller/instance/instance_controller.go +++ b/pkg/controller/instance/instance_controller.go @@ -36,7 +36,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - kudov1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudov1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" appsv1 "k8s.io/api/apps/v1" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" @@ -58,7 +58,7 @@ func (r *Reconciler) SetupWithManager( addOvRelatedInstancesToReconcile := handler.ToRequestsFunc( func(obj handler.MapObject) []reconcile.Request { requests := make([]reconcile.Request, 0) - instances := &kudov1alpha1.InstanceList{} + instances := &kudov1beta1.InstanceList{} // we are listing all instances here, which could come with some performance penalty // obj possible optimization is to introduce filtering based on operatorversion (or operator) err := mgr.GetClient().List( @@ -85,13 +85,13 @@ func (r *Reconciler) SetupWithManager( }) return ctrl.NewControllerManagedBy(mgr). - For(&kudov1alpha1.Instance{}). - Owns(&kudov1alpha1.Instance{}). + For(&kudov1beta1.Instance{}). + Owns(&kudov1beta1.Instance{}). Owns(&appsv1.Deployment{}). Owns(&corev1.Service{}). Owns(&batchv1.Job{}). Owns(&appsv1.StatefulSet{}). - Watches(&source.Kind{Type: &kudov1alpha1.OperatorVersion{}}, &handler.EnqueueRequestsFromMapFunc{ToRequests: addOvRelatedInstancesToReconcile}). + Watches(&source.Kind{Type: &kudov1beta1.OperatorVersion{}}, &handler.EnqueueRequestsFromMapFunc{ToRequests: addOvRelatedInstancesToReconcile}). Complete(r) } @@ -201,7 +201,7 @@ func (r *Reconciler) Reconcile(request ctrl.Request) (ctrl.Result, error) { return reconcile.Result{}, nil } -func preparePlanExecution(instance *kudov1alpha1.Instance, ov *kudov1alpha1.OperatorVersion, activePlanStatus *kudov1alpha1.PlanStatus) (*workflow.ActivePlan, error) { +func preparePlanExecution(instance *kudov1beta1.Instance, ov *kudov1beta1.OperatorVersion, activePlanStatus *kudov1beta1.PlanStatus) (*workflow.ActivePlan, error) { params := getParameters(instance, ov) planSpec, ok := ov.Spec.Plans[activePlanStatus.Name] @@ -222,7 +222,7 @@ func preparePlanExecution(instance *kudov1alpha1.Instance, ov *kudov1alpha1.Oper // handleError handles execution error by logging, updating the plan status and optionally publishing an event // specify eventReason as nil if you don't wish to publish a warning event // returns err if this err should be retried, nil otherwise -func (r *Reconciler) handleError(err error, instance *kudov1alpha1.Instance) error { +func (r *Reconciler) handleError(err error, instance *kudov1beta1.Instance) error { log.Printf("InstanceController: %v", err) // first update instance as we want to propagate errors also to the `Instance.Status.PlanStatus` @@ -243,7 +243,7 @@ func (r *Reconciler) handleError(err error, instance *kudov1alpha1.Instance) err } // for code being processed on instance, we need to handle these errors as well - var iError *kudov1alpha1.InstanceError + var iError *kudov1beta1.InstanceError if errors.As(err, &iError) { if iError.EventName != nil { r.Recorder.Event(instance, "Warning", kudo.StringValue(iError.EventName), err.Error()) @@ -254,8 +254,8 @@ func (r *Reconciler) handleError(err error, instance *kudov1alpha1.Instance) err // getInstance retrieves the instance by namespaced name // returns nil, nil when instance is not found (not found is not considered an error) -func (r *Reconciler) getInstance(request ctrl.Request) (instance *kudov1alpha1.Instance, err error) { - instance = &kudov1alpha1.Instance{} +func (r *Reconciler) getInstance(request ctrl.Request) (instance *kudov1beta1.Instance, err error) { + instance = &kudov1beta1.Instance{} err = r.Get(context.TODO(), request.NamespacedName, instance) if err != nil { // Error reading the object - requeue the request. @@ -269,8 +269,8 @@ func (r *Reconciler) getInstance(request ctrl.Request) (instance *kudov1alpha1.I // getOperatorVersion retrieves operatorversion belonging to the given instance // not found is treated here as any other error -func (r *Reconciler) getOperatorVersion(instance *kudov1alpha1.Instance) (ov *kudov1alpha1.OperatorVersion, err error) { - ov = &kudov1alpha1.OperatorVersion{} +func (r *Reconciler) getOperatorVersion(instance *kudov1beta1.Instance) (ov *kudov1beta1.OperatorVersion, err error) { + ov = &kudov1beta1.OperatorVersion{} err = r.Get(context.TODO(), types.NamespacedName{ Name: instance.Spec.OperatorVersion.Name, @@ -288,7 +288,7 @@ func (r *Reconciler) getOperatorVersion(instance *kudov1alpha1.Instance) (ov *ku return ov, nil } -func getParameters(instance *kudov1alpha1.Instance, operatorVersion *kudov1alpha1.OperatorVersion) map[string]string { +func getParameters(instance *kudov1beta1.Instance, operatorVersion *kudov1beta1.OperatorVersion) map[string]string { params := make(map[string]string) for k, v := range instance.Spec.Parameters { diff --git a/pkg/controller/instance/instance_controller_test.go b/pkg/controller/instance/instance_controller_test.go index 5d8f7d4a1..d5713e0fc 100644 --- a/pkg/controller/instance/instance_controller_test.go +++ b/pkg/controller/instance/instance_controller_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/util/kudo" "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" @@ -27,9 +27,9 @@ func TestRestartController(t *testing.T) { stopMgr, mgrStopped, c := startTestManager(t) log.Printf("Given an existing instance 'foo-instance' and operator 'foo-operator'") - in := &v1alpha1.Instance{ + in := &v1beta1.Instance{ ObjectMeta: metav1.ObjectMeta{Name: "foo-instance", Namespace: "default", Labels: map[string]string{kudo.OperatorLabel: "foo-operator"}}, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: "foo-operator", Namespace: "default", @@ -41,12 +41,12 @@ func TestRestartController(t *testing.T) { assert.NoError(t, c.Create(context.TODO(), in)) defer c.Delete(context.TODO(), in) - ov := &v1alpha1.OperatorVersion{ + ov := &v1beta1.OperatorVersion{ ObjectMeta: metav1.ObjectMeta{Name: "foo-operator", Namespace: "default"}, - TypeMeta: metav1.TypeMeta{Kind: "OperatorVersion", APIVersion: "kudo.dev/v1alpha1"}, - Spec: v1alpha1.OperatorVersionSpec{ - Plans: map[string]v1alpha1.Plan{"deploy": {}, "update": {}}, - Parameters: []v1alpha1.Parameter{ + TypeMeta: metav1.TypeMeta{Kind: "OperatorVersion", APIVersion: "kudo.dev/v1beta1"}, + Spec: v1beta1.OperatorVersionSpec{ + Plans: map[string]v1beta1.Plan{"deploy": {}, "update": {}}, + Parameters: []v1beta1.Parameter{ { Name: "param", Default: kudo.String("default"), @@ -81,7 +81,7 @@ func TestRestartController(t *testing.T) { } func instancePlanFinished(key client.ObjectKey, planName string, c client.Client) bool { - i := &v1alpha1.Instance{} + i := &v1beta1.Instance{} err := c.Get(context.TODO(), key, i) if err != nil { fmt.Printf("%v", err) diff --git a/pkg/controller/operator/operator_controller.go b/pkg/controller/operator/operator_controller.go index 240616c49..8439feaea 100644 --- a/pkg/controller/operator/operator_controller.go +++ b/pkg/controller/operator/operator_controller.go @@ -19,7 +19,7 @@ import ( "context" "log" - kudov1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudov1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "k8s.io/apimachinery/pkg/api/errors" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -35,7 +35,7 @@ type Reconciler struct { func (r *Reconciler) SetupWithManager( mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). - For(&kudov1alpha1.Operator{}). + For(&kudov1beta1.Operator{}). Complete(r) } @@ -44,7 +44,7 @@ func (r *Reconciler) SetupWithManager( // Automatically generate RBAC rules to allow the Controller to read and write Deployments func (r *Reconciler) Reconcile(request ctrl.Request) (ctrl.Result, error) { // Fetch the operator - operator := &kudov1alpha1.Operator{} + operator := &kudov1beta1.Operator{} err := r.Get(context.TODO(), request.NamespacedName, operator) if err != nil { if errors.IsNotFound(err) { diff --git a/pkg/controller/operatorversion/operatorversion_controller.go b/pkg/controller/operatorversion/operatorversion_controller.go index 928840fd3..15c351f68 100644 --- a/pkg/controller/operatorversion/operatorversion_controller.go +++ b/pkg/controller/operatorversion/operatorversion_controller.go @@ -19,7 +19,7 @@ import ( "context" "log" - kudov1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudov1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "k8s.io/apimachinery/pkg/api/errors" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -35,7 +35,7 @@ type Reconciler struct { func (r *Reconciler) SetupWithManager( mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). - For(&kudov1alpha1.OperatorVersion{}). + For(&kudov1beta1.OperatorVersion{}). Complete(r) } @@ -45,7 +45,7 @@ func (r *Reconciler) SetupWithManager( // Automatically generate RBAC rules to allow the Controller to read and write Deployments func (r *Reconciler) Reconcile(request ctrl.Request) (ctrl.Result, error) { // Fetch the operator version - operatorVersion := &kudov1alpha1.OperatorVersion{} + operatorVersion := &kudov1beta1.OperatorVersion{} err := r.Get(context.TODO(), request.NamespacedName, operatorVersion) if err != nil { if errors.IsNotFound(err) { diff --git a/pkg/engine/health/health.go b/pkg/engine/health/health.go index 7b93125dc..3e23d0cb5 100644 --- a/pkg/engine/health/health.go +++ b/pkg/engine/health/health.go @@ -8,7 +8,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - kudov1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudov1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" appsv1 "k8s.io/api/apps/v1" batchv1 "k8s.io/api/batch/v1" "k8s.io/apimachinery/pkg/runtime" @@ -59,7 +59,7 @@ func IsHealthy(obj runtime.Object) error { return nil } return fmt.Errorf("job \"%v\" still running or failed", obj.Name) - case *kudov1alpha1.Instance: + case *kudov1beta1.Instance: log.Printf("HealthUtil: Instance %v is in state %v", obj.Name, obj.Status.AggregatedStatus.Status) if obj.Status.AggregatedStatus.Status.IsFinished() { diff --git a/pkg/engine/task/task.go b/pkg/engine/task/task.go index bba539d1e..0cc2a2861 100644 --- a/pkg/engine/task/task.go +++ b/pkg/engine/task/task.go @@ -6,7 +6,7 @@ import ( "github.com/kudobuilder/kudo/pkg/engine" "github.com/kudobuilder/kudo/pkg/engine/renderer" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -23,7 +23,7 @@ type Context struct { // as idempotent and will be called multiple times during the life-cycle of the plan execution. // Method returns a boolean, signalizing that the task has finished successfully, and an error. // An error can wrap the ErrFatalExecution for errors that should not be retried e.g. failed template -// rendering. This will result in a v1alpha1.ExecutionFatalError in the plan execution status. A normal +// rendering. This will result in a v1beta1.ExecutionFatalError in the plan execution status. A normal // error e.g. failure during accessing the API server will be treated as "transient", meaning plan // execution engine can retry it next time. Only a (true, nil) return value will be treated as successful // task execution. @@ -44,8 +44,8 @@ var ( dummyTaskError = "DummyTaskError" ) -// Build factory method takes an v1alpha1.Task and returns a corresponding Tasker object -func Build(task *v1alpha1.Task) (Tasker, error) { +// Build factory method takes an v1beta1.Task and returns a corresponding Tasker object +func Build(task *v1beta1.Task) (Tasker, error) { switch task.Kind { case ApplyTaskKind: return newApply(task), nil @@ -58,21 +58,21 @@ func Build(task *v1alpha1.Task) (Tasker, error) { } } -func newApply(task *v1alpha1.Task) ApplyTask { +func newApply(task *v1beta1.Task) ApplyTask { return ApplyTask{ Name: task.Name, Resources: task.Spec.ResourceTaskSpec.Resources, } } -func newDelete(task *v1alpha1.Task) DeleteTask { +func newDelete(task *v1beta1.Task) DeleteTask { return DeleteTask{ Name: task.Name, Resources: task.Spec.ResourceTaskSpec.Resources, } } -func newDummy(task *v1alpha1.Task) DummyTask { +func newDummy(task *v1beta1.Task) DummyTask { return DummyTask{ Name: task.Name, WantErr: task.Spec.DummyTaskSpec.WantErr, diff --git a/pkg/engine/task/task_apply.go b/pkg/engine/task/task_apply.go index b5b047ba7..a451b7cc9 100644 --- a/pkg/engine/task/task_apply.go +++ b/pkg/engine/task/task_apply.go @@ -6,7 +6,7 @@ import ( "fmt" "log" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/engine/health" apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -114,9 +114,9 @@ func patch(newObj runtime.Object, existingObj runtime.Object, c client.Client) e } func isKudoType(object runtime.Object) bool { - _, isOperator := object.(*v1alpha1.OperatorVersion) - _, isOperatorVersion := object.(*v1alpha1.Operator) - _, isInstance := object.(*v1alpha1.Instance) + _, isOperator := object.(*v1beta1.OperatorVersion) + _, isOperatorVersion := object.(*v1beta1.Operator) + _, isInstance := object.(*v1beta1.Instance) return isOperator || isOperatorVersion || isInstance } diff --git a/pkg/engine/task/task_test.go b/pkg/engine/task/task_test.go index 93495a073..ec63ae38c 100644 --- a/pkg/engine/task/task_test.go +++ b/pkg/engine/task/task_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/stretchr/testify/assert" "sigs.k8s.io/yaml" ) @@ -73,7 +73,7 @@ spec: for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - task := &v1alpha1.Task{} + task := &v1beta1.Task{} err := yaml.Unmarshal([]byte(tt.taskYaml), task) if err != nil { t.Errorf("Failed to unmarshal task yaml %s: %v", tt.taskYaml, err) diff --git a/pkg/engine/workflow/engine.go b/pkg/engine/workflow/engine.go index 255175e2e..3925e7039 100644 --- a/pkg/engine/workflow/engine.go +++ b/pkg/engine/workflow/engine.go @@ -9,7 +9,7 @@ import ( "github.com/kudobuilder/kudo/pkg/engine/renderer" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/engine" "github.com/kudobuilder/kudo/pkg/engine/task" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -26,14 +26,14 @@ var ( // ActivePlan wraps over all data that is needed for its execution including tasks, templates, parameters etc. type ActivePlan struct { Name string - *v1alpha1.PlanStatus - Spec *v1alpha1.Plan - Tasks []v1alpha1.Task + *v1beta1.PlanStatus + Spec *v1beta1.Plan + Tasks []v1beta1.Task Templates map[string]string Params map[string]string } -func (ap *ActivePlan) taskByName(name string) (*v1alpha1.Task, bool) { +func (ap *ActivePlan) taskByName(name string) (*v1beta1.Task, bool) { for _, t := range ap.Tasks { if t.Name == name { return &t, true @@ -60,21 +60,21 @@ func (ap *ActivePlan) taskByName(name string) (*v1alpha1.Task, bool) { // // Furthermore, a transient ERROR during a step execution, means that the next step may be executed if the step strategy // is "parallel". In case of a fatal error, it is returned alongside with the new plan status and published on the event bus. -func Execute(pl *ActivePlan, em *engine.Metadata, c client.Client, enh renderer.Enhancer, currentTime time.Time) (*v1alpha1.PlanStatus, error) { +func Execute(pl *ActivePlan, em *engine.Metadata, c client.Client, enh renderer.Enhancer, currentTime time.Time) (*v1beta1.PlanStatus, error) { if pl.Status.IsTerminal() { log.Printf("PlanExecution: %s/%s plan %s is terminal, nothing to do", em.InstanceNamespace, em.InstanceName, pl.Name) return pl.PlanStatus, nil } planStatus := pl.PlanStatus.DeepCopy() - planStatus.Status = v1alpha1.ExecutionInProgress + planStatus.Status = v1beta1.ExecutionInProgress phasesLeft := len(pl.Spec.Phases) // --- 1. Iterate over plan phases --- for _, ph := range pl.Spec.Phases { phaseStatus := getPhaseStatus(ph.Name, planStatus) if phaseStatus == nil { - planStatus.Status = v1alpha1.ExecutionFatalError + planStatus.Status = v1beta1.ExecutionFatalError return planStatus, engine.ExecutionError{ Err: fmt.Errorf("%s/%s %w missing phase status: %s.%s", em.InstanceNamespace, em.InstanceName, engine.ErrFatalExecution, pl.Name, ph.Name), EventName: missingPhaseStatus, @@ -86,7 +86,7 @@ func Execute(pl *ActivePlan, em *engine.Metadata, c client.Client, enh renderer. phasesLeft = phasesLeft - 1 continue } else if isInProgress(phaseStatus.Status) { - phaseStatus.Status = v1alpha1.ExecutionInProgress + phaseStatus.Status = v1beta1.ExecutionInProgress } else { break } @@ -96,8 +96,8 @@ func Execute(pl *ActivePlan, em *engine.Metadata, c client.Client, enh renderer. for _, st := range ph.Steps { stepStatus := getStepStatus(st.Name, phaseStatus) if stepStatus == nil { - phaseStatus.Status = v1alpha1.ExecutionFatalError - planStatus.Status = v1alpha1.ExecutionFatalError + phaseStatus.Status = v1beta1.ExecutionFatalError + planStatus.Status = v1beta1.ExecutionFatalError return planStatus, engine.ExecutionError{ Err: fmt.Errorf("%s/%s %w missing step status: %s.%s.%s", em.InstanceNamespace, em.InstanceName, engine.ErrFatalExecution, pl.Name, ph.Name, st.Name), EventName: missingStepStatus, @@ -109,7 +109,7 @@ func Execute(pl *ActivePlan, em *engine.Metadata, c client.Client, enh renderer. delete(stepsLeft, stepStatus.Name) continue } else if isInProgress(stepStatus.Status) { - stepStatus.Status = v1alpha1.ExecutionInProgress + stepStatus.Status = v1beta1.ExecutionInProgress } else { // we are not in progress and not finished. An unexpected error occurred so that we can not proceed to the next phase break @@ -120,9 +120,9 @@ func Execute(pl *ActivePlan, em *engine.Metadata, c client.Client, enh renderer. for _, tn := range st.Tasks { t, ok := pl.taskByName(tn) if !ok { - phaseStatus.Status = v1alpha1.ExecutionFatalError - stepStatus.Status = v1alpha1.ExecutionFatalError - planStatus.Status = v1alpha1.ExecutionFatalError + phaseStatus.Status = v1beta1.ExecutionFatalError + stepStatus.Status = v1beta1.ExecutionFatalError + planStatus.Status = v1beta1.ExecutionFatalError return planStatus, engine.ExecutionError{ Err: fmt.Errorf("%s/%s %w missing task %s.%s.%s.%s ", em.InstanceNamespace, em.InstanceName, engine.ErrFatalExecution, pl.Name, ph.Name, st.Name, tn), EventName: unknownTaskNameEventName, @@ -140,9 +140,9 @@ func Execute(pl *ActivePlan, em *engine.Metadata, c client.Client, enh renderer. // - 3.b build the engine task - tt, err := task.Build(t) if err != nil { - stepStatus.Status = v1alpha1.ExecutionFatalError - phaseStatus.Status = v1alpha1.ExecutionFatalError - planStatus.Status = v1alpha1.ExecutionFatalError + stepStatus.Status = v1beta1.ExecutionFatalError + phaseStatus.Status = v1beta1.ExecutionFatalError + planStatus.Status = v1beta1.ExecutionFatalError return planStatus, engine.ExecutionError{ Err: fmt.Errorf("%s/%s %w failed to build task %s.%s.%s.%s: %v", em.InstanceNamespace, em.InstanceName, engine.ErrFatalExecution, pl.Name, ph.Name, st.Name, tn, err), EventName: unknownTaskKindEventName, @@ -165,13 +165,13 @@ func Execute(pl *ActivePlan, em *engine.Metadata, c client.Client, enh renderer. // stopped in the spirit of "fail-loud-and-proud". switch { case errors.Is(err, engine.ErrFatalExecution): - phaseStatus.Status = v1alpha1.ExecutionFatalError - stepStatus.Status = v1alpha1.ExecutionFatalError - planStatus.Status = v1alpha1.ExecutionFatalError + phaseStatus.Status = v1beta1.ExecutionFatalError + stepStatus.Status = v1beta1.ExecutionFatalError + planStatus.Status = v1beta1.ExecutionFatalError return planStatus, err case err != nil: fmt.Printf("PlanExecution: A transient error when executing task %s.%s.%s.%s. Will retry. %v", pl.Name, ph.Name, st.Name, t.Name, err) - stepStatus.Status = v1alpha1.ErrorStatus + stepStatus.Status = v1beta1.ErrorStatus case done: delete(tasksLeft, t.Name) } @@ -181,12 +181,12 @@ func Execute(pl *ActivePlan, em *engine.Metadata, c client.Client, enh renderer. // if some TASKs aren't ready yet and STEPs strategy is serial we can not proceed // otherwise, if STEPs strategy is parallel or all TASKs are finished, we can go to the next STEP if len(tasksLeft) > 0 { - if ph.Strategy == v1alpha1.Serial { + if ph.Strategy == v1beta1.Serial { log.Printf("PlanExecution: '%s' task(s) (instance: %s/%s) of the %s.%s.%s are not ready", mapKeysToString(tasksLeft), em.InstanceNamespace, em.InstanceName, pl.Name, ph.Name, st.Name) break } } else { - stepStatus.Status = v1alpha1.ExecutionComplete + stepStatus.Status = v1beta1.ExecutionComplete delete(stepsLeft, stepStatus.Name) } } @@ -195,12 +195,12 @@ func Execute(pl *ActivePlan, em *engine.Metadata, c client.Client, enh renderer. // if some STEPs aren't ready yet and PHASEs strategy is serial we can not proceed // otherwise, if PHASEs strategy is parallel or all STEPs are finished, we can go to the next PHASE if len(stepsLeft) > 0 { - if pl.Spec.Strategy == v1alpha1.Serial { + if pl.Spec.Strategy == v1beta1.Serial { log.Printf("PlanExecution: '%s' step(s) (instance: %s/%s) of the %s.%s are not ready", mapKeysToString(stepsLeft), em.InstanceNamespace, em.InstanceName, pl.Name, ph.Name) break } } else { - phaseStatus.Status = v1alpha1.ExecutionComplete + phaseStatus.Status = v1beta1.ExecutionComplete phasesLeft = phasesLeft - 1 } } @@ -208,7 +208,7 @@ func Execute(pl *ActivePlan, em *engine.Metadata, c client.Client, enh renderer. // --- 7. Check if all PHASEs are finished --- if phasesLeft == 0 { log.Printf("PlanExecution: %s/%s all phases of the plan %s are ready", em.InstanceNamespace, em.InstanceName, pl.Name) - planStatus.Status = v1alpha1.ExecutionComplete + planStatus.Status = v1beta1.ExecutionComplete planStatus.LastFinishedRun = v1.Time{Time: currentTime} } @@ -237,7 +237,7 @@ func stringArrayToSet(values []string) map[string]bool { // stepNamesToSet converts slice of steps to map (set) // this is useful to make it easier to remove from the collection and track what steps are finished -func stepNamesToSet(steps []v1alpha1.Step) map[string]bool { +func stepNamesToSet(steps []v1beta1.Step) map[string]bool { set := make(map[string]bool) for _, s := range steps { set[s.Name] = true @@ -245,7 +245,7 @@ func stepNamesToSet(steps []v1alpha1.Step) map[string]bool { return set } -func getStepStatus(stepName string, phaseStatus *v1alpha1.PhaseStatus) *v1alpha1.StepStatus { +func getStepStatus(stepName string, phaseStatus *v1beta1.PhaseStatus) *v1beta1.StepStatus { for i, p := range phaseStatus.Steps { if p.Name == stepName { return &phaseStatus.Steps[i] @@ -255,7 +255,7 @@ func getStepStatus(stepName string, phaseStatus *v1alpha1.PhaseStatus) *v1alpha1 return nil } -func getPhaseStatus(phaseName string, planStatus *v1alpha1.PlanStatus) *v1alpha1.PhaseStatus { +func getPhaseStatus(phaseName string, planStatus *v1beta1.PlanStatus) *v1beta1.PhaseStatus { for i, p := range planStatus.Phases { if p.Name == phaseName { return &planStatus.Phases[i] @@ -265,10 +265,10 @@ func getPhaseStatus(phaseName string, planStatus *v1alpha1.PlanStatus) *v1alpha1 return nil } -func isFinished(state v1alpha1.ExecutionStatus) bool { - return state == v1alpha1.ExecutionComplete +func isFinished(state v1beta1.ExecutionStatus) bool { + return state == v1beta1.ExecutionComplete } -func isInProgress(state v1alpha1.ExecutionStatus) bool { - return state == v1alpha1.ExecutionInProgress || state == v1alpha1.ExecutionPending || state == v1alpha1.ErrorStatus +func isInProgress(state v1beta1.ExecutionStatus) bool { + return state == v1beta1.ExecutionInProgress || state == v1beta1.ExecutionPending || state == v1beta1.ErrorStatus } diff --git a/pkg/engine/workflow/engine_test.go b/pkg/engine/workflow/engine_test.go index 737d137be..1d504cba7 100644 --- a/pkg/engine/workflow/engine_test.go +++ b/pkg/engine/workflow/engine_test.go @@ -7,7 +7,7 @@ import ( "github.com/kudobuilder/kudo/pkg/engine/renderer" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/engine" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" @@ -35,243 +35,243 @@ func TestExecutePlan(t *testing.T) { name string activePlan *ActivePlan metadata *engine.Metadata - expectedStatus *v1alpha1.PlanStatus + expectedStatus *v1beta1.PlanStatus wantErr bool enhancer renderer.Enhancer }{ {name: "plan already finished will not change its status", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionComplete, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionComplete, }, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{Status: v1alpha1.ExecutionComplete}, + expectedStatus: &v1beta1.PlanStatus{Status: v1beta1.ExecutionComplete}, enhancer: testEnhancer, }, {name: "plan with a step to be executed is in progress when the step is not completed", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Status: v1alpha1.ExecutionInProgress, Name: "step"}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Status: v1beta1.ExecutionInProgress, Name: "step"}}}}, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "serial", - Phases: []v1alpha1.Phase{ - {Name: "phase", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"task"}}}}, + Phases: []v1beta1.Phase{ + {Name: "phase", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"task"}}}}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "task", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{Done: false}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{Done: false}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Status: v1alpha1.ExecutionInProgress, Name: "step"}}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Status: v1beta1.ExecutionInProgress, Name: "step"}}}}}, enhancer: testEnhancer, }, {name: "plan with one step that is healthy is marked as completed", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionPending, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionPending, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionPending, Steps: []v1alpha1.StepStatus{{Status: v1alpha1.ExecutionPending, Name: "step"}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionPending, Steps: []v1beta1.StepStatus{{Status: v1beta1.ExecutionPending, Name: "step"}}}}, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "serial", - Phases: []v1alpha1.Phase{ - {Name: "phase", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"task"}}}}, + Phases: []v1beta1.Phase{ + {Name: "phase", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"task"}}}}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "task", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{Done: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{Done: true}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionComplete, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionComplete, LastFinishedRun: v1.Time{Time: timeNow}, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionComplete, Steps: []v1alpha1.StepStatus{{Status: v1alpha1.ExecutionComplete, Name: "step"}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionComplete, Steps: []v1beta1.StepStatus{{Status: v1beta1.ExecutionComplete, Name: "step"}}}}, }, enhancer: testEnhancer, }, {name: "plan in errored state will be retried and completed when the step is done", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Status: v1alpha1.ErrorStatus, Name: "step"}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Status: v1beta1.ErrorStatus, Name: "step"}}}}, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "serial", - Phases: []v1alpha1.Phase{ - {Name: "phase", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"task"}}}}, + Phases: []v1beta1.Phase{ + {Name: "phase", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"task"}}}}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "task", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{Done: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{Done: true}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionComplete, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionComplete, LastFinishedRun: v1.Time{Time: timeNow}, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionComplete, Steps: []v1alpha1.StepStatus{{Status: v1alpha1.ExecutionComplete, Name: "step"}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionComplete, Steps: []v1beta1.StepStatus{{Status: v1beta1.ExecutionComplete, Name: "step"}}}}, }, enhancer: testEnhancer, }, // --- Proper error and fatal error status propagation --- {name: "plan in progress, will have step error status, when a task fails", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionInProgress}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionInProgress}}}}, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "serial", - Phases: []v1alpha1.Phase{ - {Name: "phase", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"task"}}}}, + Phases: []v1beta1.Phase{ + {Name: "phase", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"task"}}}}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "task", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: true}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Status: v1alpha1.ErrorStatus, Name: "step"}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Status: v1beta1.ErrorStatus, Name: "step"}}}}, }, enhancer: testEnhancer, }, {name: "plan in progress, will have plan/phase/step fatal error status, when a task fails with a fatal error", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionInProgress}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionInProgress}}}}, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "serial", - Phases: []v1alpha1.Phase{ - {Name: "phase", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"task"}}}}, + Phases: []v1beta1.Phase{ + {Name: "phase", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"task"}}}}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "task", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: true, Fatal: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: true, Fatal: true}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionFatalError, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionFatalError, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionFatalError, Steps: []v1alpha1.StepStatus{{Status: v1alpha1.ExecutionFatalError, Name: "step"}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionFatalError, Steps: []v1beta1.StepStatus{{Status: v1beta1.ExecutionFatalError, Name: "step"}}}}, }, wantErr: true, enhancer: testEnhancer, }, {name: "plan in progress with a misconfigured task will fail with a fatal error", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionInProgress}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionInProgress}}}}, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "serial", - Phases: []v1alpha1.Phase{ - {Name: "phase", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"fake-task"}}}}, + Phases: []v1beta1.Phase{ + {Name: "phase", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"fake-task"}}}}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "task", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: false}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: false}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionFatalError, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionFatalError, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionFatalError, Steps: []v1alpha1.StepStatus{{Status: v1alpha1.ExecutionFatalError, Name: "step"}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionFatalError, Steps: []v1beta1.StepStatus{{Status: v1beta1.ExecutionFatalError, Name: "step"}}}}, }, wantErr: true, enhancer: testEnhancer, }, {name: "plan in progress with an unknown task spec will fail with a fatal error", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionInProgress}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionInProgress}}}}, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "serial", - Phases: []v1alpha1.Phase{ - {Name: "phase", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"task"}}}}, + Phases: []v1beta1.Phase{ + {Name: "phase", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"task"}}}}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "task", Kind: "Unknown", - Spec: v1alpha1.TaskSpec{}, + Spec: v1beta1.TaskSpec{}, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionFatalError, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionFatalError, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionFatalError, Steps: []v1alpha1.StepStatus{{Status: v1alpha1.ExecutionFatalError, Name: "step"}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionFatalError, Steps: []v1beta1.StepStatus{{Status: v1beta1.ExecutionFatalError, Name: "step"}}}}, }, wantErr: true, enhancer: testEnhancer, @@ -279,144 +279,144 @@ func TestExecutePlan(t *testing.T) { // --- Respect the Steps execution strategy --- {name: "plan in progress with multiple serial steps, will respect serial step strategy and stop after first step fails", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{ - {Name: "stepOne", Status: v1alpha1.ExecutionInProgress}, - {Name: "stepTwo", Status: v1alpha1.ExecutionInProgress}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{ + {Name: "stepOne", Status: v1beta1.ExecutionInProgress}, + {Name: "stepTwo", Status: v1beta1.ExecutionInProgress}, }}}, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "serial", - Phases: []v1alpha1.Phase{ - {Name: "phase", Strategy: "serial", Steps: []v1alpha1.Step{ + Phases: []v1beta1.Phase{ + {Name: "phase", Strategy: "serial", Steps: []v1beta1.Step{ {Name: "stepOne", Tasks: []string{"taskOne"}}, {Name: "stepTwo", Tasks: []string{"taskTwo"}}, }}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "taskOne", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: true}, }, }, { Name: "taskTwo", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: false}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: false}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{ - {Name: "stepOne", Status: v1alpha1.ErrorStatus}, - {Name: "stepTwo", Status: v1alpha1.ExecutionInProgress}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{ + {Name: "stepOne", Status: v1beta1.ErrorStatus}, + {Name: "stepTwo", Status: v1beta1.ExecutionInProgress}, }}}, }, enhancer: testEnhancer, }, {name: "plan in progress with multiple parallel steps, will respect parallel step strategy and continue when first step fails", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{ - {Name: "stepOne", Status: v1alpha1.ExecutionInProgress}, - {Name: "stepTwo", Status: v1alpha1.ExecutionInProgress}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{ + {Name: "stepOne", Status: v1beta1.ExecutionInProgress}, + {Name: "stepTwo", Status: v1beta1.ExecutionInProgress}, }}}, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "serial", - Phases: []v1alpha1.Phase{ - {Name: "phase", Strategy: "parallel", Steps: []v1alpha1.Step{ + Phases: []v1beta1.Phase{ + {Name: "phase", Strategy: "parallel", Steps: []v1beta1.Step{ {Name: "stepOne", Tasks: []string{"taskOne"}}, {Name: "stepTwo", Tasks: []string{"taskTwo"}}, }}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "taskOne", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: true}, }, }, { Name: "taskTwo", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{Done: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{Done: true}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{ - {Name: "stepOne", Status: v1alpha1.ErrorStatus}, - {Name: "stepTwo", Status: v1alpha1.ExecutionComplete}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{ + {Name: "stepOne", Status: v1beta1.ErrorStatus}, + {Name: "stepTwo", Status: v1beta1.ExecutionComplete}, }}}, }, enhancer: testEnhancer, }, {name: "plan in progress with multiple parallel steps, will stop the execution on the first fatal step error", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{ - {Name: "stepOne", Status: v1alpha1.ExecutionInProgress}, - {Name: "stepTwo", Status: v1alpha1.ExecutionInProgress}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{ + {Name: "stepOne", Status: v1beta1.ExecutionInProgress}, + {Name: "stepTwo", Status: v1beta1.ExecutionInProgress}, }}}, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "serial", - Phases: []v1alpha1.Phase{ - {Name: "phase", Strategy: "parallel", Steps: []v1alpha1.Step{ + Phases: []v1beta1.Phase{ + {Name: "phase", Strategy: "parallel", Steps: []v1beta1.Step{ {Name: "stepOne", Tasks: []string{"taskOne"}}, {Name: "stepTwo", Tasks: []string{"taskTwo"}}, }}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "taskOne", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: true, Fatal: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: true, Fatal: true}, }, }, { Name: "taskTwo", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: false}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: false}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionFatalError, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionFatalError, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionFatalError, Steps: []v1alpha1.StepStatus{ - {Name: "stepOne", Status: v1alpha1.ExecutionFatalError}, - {Name: "stepTwo", Status: v1alpha1.ExecutionInProgress}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionFatalError, Steps: []v1beta1.StepStatus{ + {Name: "stepOne", Status: v1beta1.ExecutionFatalError}, + {Name: "stepTwo", Status: v1beta1.ExecutionInProgress}, }}}, }, wantErr: true, @@ -425,138 +425,138 @@ func TestExecutePlan(t *testing.T) { // --- Respect the Phases execution strategy --- {name: "plan in progress with multiple serial phases, will respect serial phase strategy and stop after first phase fails", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{ - {Name: "phaseOne", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionInProgress}}}, - {Name: "phaseTwo", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionInProgress}}}, + Phases: []v1beta1.PhaseStatus{ + {Name: "phaseOne", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionInProgress}}}, + {Name: "phaseTwo", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionInProgress}}}, }, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "serial", - Phases: []v1alpha1.Phase{ - {Name: "phaseOne", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"taskOne"}}}}, - {Name: "phaseTwo", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"taskTwo"}}}}, + Phases: []v1beta1.Phase{ + {Name: "phaseOne", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"taskOne"}}}}, + {Name: "phaseTwo", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"taskTwo"}}}}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "taskOne", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: true}, }, }, { Name: "taskTwo", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: false}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: false}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{ - {Name: "phaseOne", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ErrorStatus}}}, - {Name: "phaseTwo", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionInProgress}}}, + Phases: []v1beta1.PhaseStatus{ + {Name: "phaseOne", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ErrorStatus}}}, + {Name: "phaseTwo", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionInProgress}}}, }, }, enhancer: testEnhancer, }, {name: "plan in progress with multiple parallel phases, will respect parallel phase strategy and continue after first phase fails", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{ - {Name: "phaseOne", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionInProgress}}}, - {Name: "phaseTwo", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionInProgress}}}, + Phases: []v1beta1.PhaseStatus{ + {Name: "phaseOne", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionInProgress}}}, + {Name: "phaseTwo", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionInProgress}}}, }, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "parallel", - Phases: []v1alpha1.Phase{ - {Name: "phaseOne", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"taskOne"}}}}, - {Name: "phaseTwo", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"taskTwo"}}}}, + Phases: []v1beta1.Phase{ + {Name: "phaseOne", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"taskOne"}}}}, + {Name: "phaseTwo", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"taskTwo"}}}}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "taskOne", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: true}, }, }, { Name: "taskTwo", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{Done: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{Done: true}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{ - {Name: "phaseOne", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ErrorStatus}}}, - {Name: "phaseTwo", Status: v1alpha1.ExecutionComplete, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionComplete}}}, + Phases: []v1beta1.PhaseStatus{ + {Name: "phaseOne", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ErrorStatus}}}, + {Name: "phaseTwo", Status: v1beta1.ExecutionComplete, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionComplete}}}, }, }, enhancer: testEnhancer, }, {name: "plan in progress with multiple parallel phases, will stop the execution on the first fatal step error", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionInProgress, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionInProgress, Name: "test", - Phases: []v1alpha1.PhaseStatus{ - {Name: "phaseOne", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionInProgress}}}, - {Name: "phaseTwo", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionInProgress}}}, + Phases: []v1beta1.PhaseStatus{ + {Name: "phaseOne", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionInProgress}}}, + {Name: "phaseTwo", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionInProgress}}}, }, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "parallel", - Phases: []v1alpha1.Phase{ - {Name: "phaseOne", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"taskOne"}}}}, - {Name: "phaseTwo", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"taskTwo"}}}}, + Phases: []v1beta1.Phase{ + {Name: "phaseOne", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"taskOne"}}}}, + {Name: "phaseTwo", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"taskTwo"}}}}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "taskOne", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: true, Fatal: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: true, Fatal: true}, }, }, { Name: "taskTwo", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: false}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: false}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionFatalError, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionFatalError, Name: "test", - Phases: []v1alpha1.PhaseStatus{ - {Name: "phaseOne", Status: v1alpha1.ExecutionFatalError, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionFatalError}}}, - {Name: "phaseTwo", Status: v1alpha1.ExecutionInProgress, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionInProgress}}}, + Phases: []v1beta1.PhaseStatus{ + {Name: "phaseOne", Status: v1beta1.ExecutionFatalError, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionFatalError}}}, + {Name: "phaseTwo", Status: v1beta1.ExecutionInProgress, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionInProgress}}}, }, }, wantErr: true, @@ -566,33 +566,33 @@ func TestExecutePlan(t *testing.T) { name: "plan in a pending status will have fatal plan/phase/step statuses when a step has a fatal error", activePlan: &ActivePlan{ Name: "test", - PlanStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionPending, + PlanStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionPending, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionPending, Steps: []v1alpha1.StepStatus{{Name: "step", Status: v1alpha1.ExecutionPending}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionPending, Steps: []v1beta1.StepStatus{{Name: "step", Status: v1beta1.ExecutionPending}}}}, }, - Spec: &v1alpha1.Plan{ + Spec: &v1beta1.Plan{ Strategy: "serial", - Phases: []v1alpha1.Phase{ - {Name: "phase", Strategy: "serial", Steps: []v1alpha1.Step{{Name: "step", Tasks: []string{"task"}}}}, + Phases: []v1beta1.Phase{ + {Name: "phase", Strategy: "serial", Steps: []v1beta1.Step{{Name: "step", Tasks: []string{"task"}}}}, }, }, - Tasks: []v1alpha1.Task{ + Tasks: []v1beta1.Task{ { Name: "task", Kind: "Dummy", - Spec: v1alpha1.TaskSpec{ - DummyTaskSpec: v1alpha1.DummyTaskSpec{WantErr: true, Fatal: true}, + Spec: v1beta1.TaskSpec{ + DummyTaskSpec: v1beta1.DummyTaskSpec{WantErr: true, Fatal: true}, }, }, }, Templates: map[string]string{}, }, metadata: meta, - expectedStatus: &v1alpha1.PlanStatus{ - Status: v1alpha1.ExecutionFatalError, + expectedStatus: &v1beta1.PlanStatus{ + Status: v1beta1.ExecutionFatalError, Name: "test", - Phases: []v1alpha1.PhaseStatus{{Name: "phase", Status: v1alpha1.ExecutionFatalError, Steps: []v1alpha1.StepStatus{{Status: v1alpha1.ExecutionFatalError, Name: "step"}}}}}, + Phases: []v1beta1.PhaseStatus{{Name: "phase", Status: v1beta1.ExecutionFatalError, Steps: []v1beta1.StepStatus{{Status: v1beta1.ExecutionFatalError, Name: "step"}}}}}, wantErr: true, enhancer: testEnhancer, }, @@ -616,17 +616,17 @@ func TestExecutePlan(t *testing.T) { } } -func instance() *v1alpha1.Instance { - return &v1alpha1.Instance{ +func instance() *v1beta1.Instance { + return &v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Instance", }, ObjectMeta: metav1.ObjectMeta{ Name: "test-instance", Namespace: "default", }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: corev1.ObjectReference{ Name: "first-operator", }, diff --git a/pkg/kudoctl/cmd/get/get_test.go b/pkg/kudoctl/cmd/get/get_test.go index 258863a89..7fb0e879f 100644 --- a/pkg/kudoctl/cmd/get/get_test.go +++ b/pkg/kudoctl/cmd/get/get_test.go @@ -3,7 +3,7 @@ package get import ( "testing" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/fake" "github.com/kudobuilder/kudo/pkg/kudoctl/env" "github.com/kudobuilder/kudo/pkg/kudoctl/util/kudo" @@ -36,9 +36,9 @@ func newTestClient() *kudo.Client { } func TestGetInstances(t *testing.T) { - testInstance := &v1alpha1.Instance{ + testInstance := &v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Instance", }, ObjectMeta: metav1.ObjectMeta{ @@ -48,7 +48,7 @@ func TestGetInstances(t *testing.T) { }, Name: "test", }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: "test-1.0", }, diff --git a/pkg/kudoctl/cmd/init/manager.go b/pkg/kudoctl/cmd/init/manager.go index 079961c6b..7b6152c75 100644 --- a/pkg/kudoctl/cmd/init/manager.go +++ b/pkg/kudoctl/cmd/init/manager.go @@ -29,7 +29,7 @@ const ( autoAnnotation = reloaderAnnotationBase + "auto" secretAnnotation = "secret." + reloaderAnnotationBase + "reload" configMapAnnotation = "configmap." + reloaderAnnotationBase + "reload" - crdVersion = "v1alpha1" + crdVersion = "v1beta1" defaultns = "kudo-system" defaultGracePeriod = 10 ) diff --git a/pkg/kudoctl/cmd/init_integration_test.go b/pkg/kudoctl/cmd/init_integration_test.go index 1050253f4..c4404cb7a 100644 --- a/pkg/kudoctl/cmd/init_integration_test.go +++ b/pkg/kudoctl/cmd/init_integration_test.go @@ -46,9 +46,9 @@ func TestMain(m *testing.M) { } const ( - operatorFileName = "kudo_v1alpha1_operator.yaml" - operatorVersionFileName = "kudo_v1alpha1_operatorversion.yaml" - instanceFileName = "kudo_v1alpha1_instance.yaml" + operatorFileName = "kudo_v1beta1_operator.yaml" + operatorVersionFileName = "kudo_v1beta1_operatorversion.yaml" + instanceFileName = "kudo_v1beta1_instance.yaml" manifestsDir = "../../../config/crds/" ) @@ -117,7 +117,7 @@ func TestIntegInitForCRDs(t *testing.T) { assert.Nil(t, err) kclient := getKubeClient(t) - instance := testutils.NewResource("kudo.dev/v1alpha1", "Instance", "zk", "ns") + instance := testutils.NewResource("kudo.dev/v1beta1", "Instance", "zk", "ns") // Verify that we cannot create the instance, because the test environment is empty. assert.IsType(t, &meta.NoKindMatchError{}, testClient.Create(context.TODO(), instance)) @@ -156,7 +156,7 @@ func TestIntegInitWithNameSpace(t *testing.T) { assert.Nil(t, err) kclient := getKubeClient(t) - instance := testutils.NewResource("kudo.dev/v1alpha1", "Instance", "zk", "ns") + instance := testutils.NewResource("kudo.dev/v1beta1", "Instance", "zk", "ns") // Verify that we cannot create the instance, because the test environment is empty. assert.IsType(t, &meta.NoKindMatchError{}, testClient.Create(context.TODO(), instance)) @@ -217,7 +217,7 @@ func TestNoErrorOnReInit(t *testing.T) { assert.Nil(t, err) kclient := getKubeClient(t) - instance := testutils.NewResource("kudo.dev/v1alpha1", "Instance", "zk", "ns") + instance := testutils.NewResource("kudo.dev/v1beta1", "Instance", "zk", "ns") // Verify that we cannot create the instance, because the test environment is empty. assert.IsType(t, &meta.NoKindMatchError{}, testClient.Create(context.TODO(), instance)) diff --git a/pkg/kudoctl/cmd/plan/plan_status.go b/pkg/kudoctl/cmd/plan/plan_status.go index d45d00387..a41c0186e 100644 --- a/pkg/kudoctl/cmd/plan/plan_status.go +++ b/pkg/kudoctl/cmd/plan/plan_status.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - kudov1alpha1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudov1beta1 "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/kudoctl/env" "github.com/spf13/cobra" "github.com/xlab/treeprint" @@ -51,7 +51,7 @@ func planStatus(options *Options, settings *env.Settings) error { instancesGVR := schema.GroupVersionResource{ Group: "kudo.dev", - Version: "v1alpha1", + Version: "v1beta1", Resource: "instances", } @@ -65,7 +65,7 @@ func planStatus(options *Options, settings *env.Settings) error { return err } - instance := kudov1alpha1.Instance{} + instance := kudov1beta1.Instance{} err = json.Unmarshal(mInstObj, &instance) if err != nil { @@ -76,7 +76,7 @@ func planStatus(options *Options, settings *env.Settings) error { operatorGVR := schema.GroupVersionResource{ Group: "kudo.dev", - Version: "v1alpha1", + Version: "v1beta1", Resource: "operatorversions", } @@ -91,7 +91,7 @@ func planStatus(options *Options, settings *env.Settings) error { return err } - operator := kudov1alpha1.OperatorVersion{} + operator := kudov1beta1.OperatorVersion{} err = json.Unmarshal(mOperatorObj, &operator) if err != nil { diff --git a/pkg/kudoctl/cmd/test.go b/pkg/kudoctl/cmd/test.go index 16fd3db04..f38daa390 100644 --- a/pkg/kudoctl/cmd/test.go +++ b/pkg/kudoctl/cmd/test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/test" testutils "github.com/kudobuilder/kudo/pkg/test/utils" diff --git a/pkg/kudoctl/cmd/testdata/deploy-kudo-manager-only.yaml.golden b/pkg/kudoctl/cmd/testdata/deploy-kudo-manager-only.yaml.golden index c9c5b09c5..d7ea4992c 100644 --- a/pkg/kudoctl/cmd/testdata/deploy-kudo-manager-only.yaml.golden +++ b/pkg/kudoctl/cmd/testdata/deploy-kudo-manager-only.yaml.golden @@ -46,7 +46,7 @@ spec: status: type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" @@ -147,7 +147,7 @@ spec: status: type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" @@ -196,7 +196,7 @@ spec: type: object type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" diff --git a/pkg/kudoctl/cmd/testdata/deploy-kudo-ns-default.yaml.golden b/pkg/kudoctl/cmd/testdata/deploy-kudo-ns-default.yaml.golden index 20ede8df1..9338b3da3 100644 --- a/pkg/kudoctl/cmd/testdata/deploy-kudo-ns-default.yaml.golden +++ b/pkg/kudoctl/cmd/testdata/deploy-kudo-ns-default.yaml.golden @@ -46,7 +46,7 @@ spec: status: type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" @@ -147,7 +147,7 @@ spec: status: type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" @@ -196,7 +196,7 @@ spec: type: object type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" diff --git a/pkg/kudoctl/cmd/testdata/deploy-kudo-ns.yaml.golden b/pkg/kudoctl/cmd/testdata/deploy-kudo-ns.yaml.golden index d66827f38..81286652d 100644 --- a/pkg/kudoctl/cmd/testdata/deploy-kudo-ns.yaml.golden +++ b/pkg/kudoctl/cmd/testdata/deploy-kudo-ns.yaml.golden @@ -46,7 +46,7 @@ spec: status: type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" @@ -147,7 +147,7 @@ spec: status: type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" @@ -196,7 +196,7 @@ spec: type: object type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" diff --git a/pkg/kudoctl/cmd/testdata/deploy-kudo-reloader-only.yaml.golden b/pkg/kudoctl/cmd/testdata/deploy-kudo-reloader-only.yaml.golden index 182694268..7bd1973fa 100644 --- a/pkg/kudoctl/cmd/testdata/deploy-kudo-reloader-only.yaml.golden +++ b/pkg/kudoctl/cmd/testdata/deploy-kudo-reloader-only.yaml.golden @@ -46,7 +46,7 @@ spec: status: type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" @@ -147,7 +147,7 @@ spec: status: type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" @@ -196,7 +196,7 @@ spec: type: object type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" diff --git a/pkg/kudoctl/cmd/testdata/deploy-kudo.yaml.golden b/pkg/kudoctl/cmd/testdata/deploy-kudo.yaml.golden index 20ede8df1..9338b3da3 100644 --- a/pkg/kudoctl/cmd/testdata/deploy-kudo.yaml.golden +++ b/pkg/kudoctl/cmd/testdata/deploy-kudo.yaml.golden @@ -46,7 +46,7 @@ spec: status: type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" @@ -147,7 +147,7 @@ spec: status: type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" @@ -196,7 +196,7 @@ spec: type: object type: object type: object - version: v1alpha1 + version: v1beta1 status: acceptedNames: kind: "" diff --git a/pkg/kudoctl/cmd/testdata/index.yaml.golden b/pkg/kudoctl/cmd/testdata/index.yaml.golden index c58db07f8..6241b5990 100644 --- a/pkg/kudoctl/cmd/testdata/index.yaml.golden +++ b/pkg/kudoctl/cmd/testdata/index.yaml.golden @@ -2,7 +2,7 @@ apiVersion: v1 entries: zookeeper: - appVersion: 3.4.10 - digest: 0ab20aad336fa631e532d234cd98c75b755b3cac00f87abbf21165d48a017575 + digest: 958eeb121727a8df63a37781af4cc9168c812d3f121657fabef9a14e486df106 maintainers: - email: avarkockova@mesosphere.com name: Alena Varkockova diff --git a/pkg/kudoctl/cmd/uninstall_test.go b/pkg/kudoctl/cmd/uninstall_test.go index b310dde58..78a0ea65e 100644 --- a/pkg/kudoctl/cmd/uninstall_test.go +++ b/pkg/kudoctl/cmd/uninstall_test.go @@ -5,7 +5,7 @@ import ( "github.com/kudobuilder/kudo/pkg/kudoctl/env" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/fake" "github.com/kudobuilder/kudo/pkg/kudoctl/util/kudo" util "github.com/kudobuilder/kudo/pkg/util/kudo" @@ -18,9 +18,9 @@ func newTestClient() *kudo.Client { } func TestUninstall(t *testing.T) { - testInstance := v1alpha1.Instance{ + testInstance := v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Instance", }, ObjectMeta: metav1.ObjectMeta{ @@ -30,7 +30,7 @@ func TestUninstall(t *testing.T) { }, Name: "test", }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: "test-1.0", }, diff --git a/pkg/kudoctl/cmd/update_test.go b/pkg/kudoctl/cmd/update_test.go index 3d3fe26f6..c530b9241 100644 --- a/pkg/kudoctl/cmd/update_test.go +++ b/pkg/kudoctl/cmd/update_test.go @@ -7,7 +7,7 @@ import ( "github.com/kudobuilder/kudo/pkg/kudoctl/env" "gotest.tools/assert" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" util "github.com/kudobuilder/kudo/pkg/util/kudo" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -40,9 +40,9 @@ func TestUpdateCommand_Validation(t *testing.T) { } func TestUpdate(t *testing.T) { - testInstance := v1alpha1.Instance{ + testInstance := v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Instance", }, ObjectMeta: metav1.ObjectMeta{ @@ -52,7 +52,7 @@ func TestUpdate(t *testing.T) { }, Name: "test", }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: "test-1.0", }, diff --git a/pkg/kudoctl/packages/package.go b/pkg/kudoctl/packages/package.go index f2baa3ed8..25491453d 100644 --- a/pkg/kudoctl/packages/package.go +++ b/pkg/kudoctl/packages/package.go @@ -10,7 +10,7 @@ import ( "strconv" "strings" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/engine/task" "github.com/kudobuilder/kudo/pkg/kudoctl/files" "github.com/kudobuilder/kudo/pkg/util/kudo" @@ -26,38 +26,37 @@ const ( operatorFileName = "operator.yaml" templateFileNameRegex = "templates/.*.yaml" paramsFileName = "params.yaml" - ServerAPIVersion = "kudo.dev/v1alpha1" - PackageAPIVersion = "kudo.dev/v1beta1" + APIVersion = "kudo.dev/v1beta1" ) // Resources is collection of CRDs that are used when installing operator // during installation, package format is converted to this structure type Resources struct { - Operator *v1alpha1.Operator - OperatorVersion *v1alpha1.OperatorVersion - Instance *v1alpha1.Instance + Operator *v1beta1.Operator + OperatorVersion *v1beta1.OperatorVersion + Instance *v1beta1.Instance } // PackageFiles represents the raw operator package format the way it is found in the tgz packages type PackageFiles struct { Templates map[string]string Operator *Operator - Params []v1alpha1.Parameter + Params []v1beta1.Parameter } // Operator is a representation of the KEP-9 Operator YAML type Operator struct { - APIVersion string `json:"apiVersion,omitempty"` - Name string `json:"name"` - Description string `json:"description,omitempty"` - Version string `json:"version"` - AppVersion string `json:"appVersion,omitempty"` - KUDOVersion string `json:"kudoVersion,omitempty"` - KubernetesVersion string `json:"kubernetesVersion,omitempty"` - Maintainers []*v1alpha1.Maintainer `json:"maintainers,omitempty"` - URL string `json:"url,omitempty"` - Tasks []v1alpha1.Task `json:"tasks"` - Plans map[string]v1alpha1.Plan `json:"plans"` + APIVersion string `json:"apiVersion,omitempty"` + Name string `json:"name"` + Description string `json:"description,omitempty"` + Version string `json:"version"` + AppVersion string `json:"appVersion,omitempty"` + KUDOVersion string `json:"kudoVersion,omitempty"` + KubernetesVersion string `json:"kubernetesVersion,omitempty"` + Maintainers []*v1beta1.Maintainer `json:"maintainers,omitempty"` + URL string `json:"url,omitempty"` + Tasks []v1beta1.Task `json:"tasks"` + Plans map[string]v1beta1.Plan `json:"plans"` } // PackageFilesDigest is a tuple of data used to return the package files AND the digest of a tarball @@ -89,10 +88,10 @@ func parsePackageFile(filePath string, fileBytes []byte, currentPackage *Package return errors.Wrap(err, "failed to unmarshal operator file") } if currentPackage.Operator.APIVersion == "" { - currentPackage.Operator.APIVersion = PackageAPIVersion + currentPackage.Operator.APIVersion = APIVersion } - if currentPackage.Operator.APIVersion != PackageAPIVersion { - return fmt.Errorf("expecting supported API version %s but got %s", PackageAPIVersion, currentPackage.Operator.APIVersion) + if currentPackage.Operator.APIVersion != APIVersion { + return fmt.Errorf("expecting supported API version %s but got %s", APIVersion, currentPackage.Operator.APIVersion) } case isTemplateFile(filePath): pathParts := strings.Split(filePath, "templates/") @@ -103,7 +102,7 @@ func parsePackageFile(filePath string, fileBytes []byte, currentPackage *Package if err := yaml.Unmarshal(fileBytes, ¶ms); err != nil { return errors.Wrapf(err, "failed to unmarshal parameters file: %s", filePath) } - paramsStruct := make([]v1alpha1.Parameter, 0) + paramsStruct := make([]v1beta1.Parameter, 0) for paramName, param := range params { required := true // defaults to true if _, ok := param["required"]; ok { @@ -120,7 +119,7 @@ func parsePackageFile(filePath string, fileBytes []byte, currentPackage *Package defaultValue = kudo.String(val) } - r := v1alpha1.Parameter{ + r := v1beta1.Parameter{ Name: paramName, Description: param["description"], Default: defaultValue, @@ -143,7 +142,7 @@ func newPackageFiles() PackageFiles { } } -func validateTask(t v1alpha1.Task, templates map[string]string) []string { +func validateTask(t v1beta1.Task, templates map[string]string) []string { var resources []string switch t.Kind { case task.ApplyTaskKind: @@ -181,35 +180,35 @@ func (p *PackageFiles) getCRDs() (*Resources, error) { return nil, errors.New(strings.Join(errs, "\n")) } - operator := &v1alpha1.Operator{ + operator := &v1beta1.Operator{ TypeMeta: metav1.TypeMeta{ Kind: "Operator", - APIVersion: ServerAPIVersion, + APIVersion: APIVersion, }, ObjectMeta: metav1.ObjectMeta{ Name: p.Operator.Name, Labels: map[string]string{"controller-tools.k8s.io": "1.0"}, }, - Spec: v1alpha1.OperatorSpec{ + Spec: v1beta1.OperatorSpec{ Description: p.Operator.Description, KudoVersion: p.Operator.KUDOVersion, KubernetesVersion: p.Operator.KubernetesVersion, Maintainers: p.Operator.Maintainers, URL: p.Operator.URL, }, - Status: v1alpha1.OperatorStatus{}, + Status: v1beta1.OperatorStatus{}, } - fv := &v1alpha1.OperatorVersion{ + fv := &v1beta1.OperatorVersion{ TypeMeta: metav1.TypeMeta{ Kind: "OperatorVersion", - APIVersion: ServerAPIVersion, + APIVersion: APIVersion, }, ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%s", p.Operator.Name, p.Operator.Version), Labels: map[string]string{"controller-tools.k8s.io": "1.0"}, }, - Spec: v1alpha1.OperatorVersionSpec{ + Spec: v1beta1.OperatorVersionSpec{ Operator: v1.ObjectReference{ Name: p.Operator.Name, Kind: "Operator", @@ -221,24 +220,24 @@ func (p *PackageFiles) getCRDs() (*Resources, error) { Plans: p.Operator.Plans, UpgradableFrom: nil, }, - Status: v1alpha1.OperatorVersionStatus{}, + Status: v1beta1.OperatorVersionStatus{}, } - instance := &v1alpha1.Instance{ + instance := &v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ Kind: "Instance", - APIVersion: ServerAPIVersion, + APIVersion: APIVersion, }, ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-instance", p.Operator.Name), Labels: map[string]string{"controller-tools.k8s.io": "1.0", kudo.OperatorLabel: p.Operator.Name}, }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: fmt.Sprintf("%s-%s", p.Operator.Name, p.Operator.Version), }, }, - Status: v1alpha1.InstanceStatus{}, + Status: v1beta1.InstanceStatus{}, } return &Resources{ diff --git a/pkg/kudoctl/packages/package_test.go b/pkg/kudoctl/packages/package_test.go index f4af6156e..29104e8b7 100644 --- a/pkg/kudoctl/packages/package_test.go +++ b/pkg/kudoctl/packages/package_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/go-test/deep" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/pkg/errors" "github.com/spf13/afero" "sigs.k8s.io/yaml" @@ -32,16 +32,16 @@ func TestReadFileSystemPackage(t *testing.T) { t.Run(fmt.Sprintf("%s-from-%s", tt.name, tt.path), func(t *testing.T) { pkg, err := ReadPackage(fs, tt.path) if err != nil { - t.Fatalf("Found unexpected error: %v", err) + t.Errorf("Found unexpected error: %v", err) } actual, err := pkg.GetCRDs() if err != nil { - t.Fatalf("Found unexpected error: %v", err) + t.Errorf("Found unexpected error: %v", err) } actual.Instance.ObjectMeta.Name = tt.instanceName golden, err := loadResourcesFromPath(tt.goldenFiles) if err != nil { - t.Fatalf("Found unexpected error when loading golden files: %v", err) + t.Errorf("Found unexpected error when loading golden files: %v", err) } // we need to sort here because current yaml parsing is not preserving the order of fields @@ -88,19 +88,19 @@ func loadResourcesFromPath(goldenPath string) (*Resources, error) { } switch { case isOperatorFile(info.Name()): - var f v1alpha1.Operator + var f v1beta1.Operator if err = yaml.Unmarshal(bytes, &f); err != nil { return errors.Wrapf(err, "cannot unmarshal %s content", info.Name()) } result.Operator = &f case isVersionFile(info.Name()): - var fv v1alpha1.OperatorVersion + var fv v1beta1.OperatorVersion if err = yaml.Unmarshal(bytes, &fv); err != nil { return errors.Wrapf(err, "cannot unmarshal %s content", info.Name()) } result.OperatorVersion = &fv case isInstanceFile(info.Name()): - var i v1alpha1.Instance + var i v1beta1.Instance if err = yaml.Unmarshal(bytes, &i); err != nil { return errors.Wrapf(err, "cannot unmarshal %s content", info.Name()) } diff --git a/pkg/kudoctl/packages/testdata/zk-crd-golden1/instance.golden b/pkg/kudoctl/packages/testdata/zk-crd-golden1/instance.golden index f39870fc1..e5c2e5b15 100644 --- a/pkg/kudoctl/packages/testdata/zk-crd-golden1/instance.golden +++ b/pkg/kudoctl/packages/testdata/zk-crd-golden1/instance.golden @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: labels: diff --git a/pkg/kudoctl/packages/testdata/zk-crd-golden1/operator.golden b/pkg/kudoctl/packages/testdata/zk-crd-golden1/operator.golden index df1731ccc..cd104ce45 100644 --- a/pkg/kudoctl/packages/testdata/zk-crd-golden1/operator.golden +++ b/pkg/kudoctl/packages/testdata/zk-crd-golden1/operator.golden @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Operator metadata: labels: diff --git a/pkg/kudoctl/packages/testdata/zk-crd-golden1/operatorversion.golden b/pkg/kudoctl/packages/testdata/zk-crd-golden1/operatorversion.golden index 64b50b82f..da4a77cd9 100644 --- a/pkg/kudoctl/packages/testdata/zk-crd-golden1/operatorversion.golden +++ b/pkg/kudoctl/packages/testdata/zk-crd-golden1/operatorversion.golden @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: labels: diff --git a/pkg/kudoctl/packages/testdata/zk-crd-golden2/instance.golden b/pkg/kudoctl/packages/testdata/zk-crd-golden2/instance.golden index f21de6b61..6e516507e 100644 --- a/pkg/kudoctl/packages/testdata/zk-crd-golden2/instance.golden +++ b/pkg/kudoctl/packages/testdata/zk-crd-golden2/instance.golden @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: labels: diff --git a/pkg/kudoctl/packages/testdata/zk-crd-golden2/operator.golden b/pkg/kudoctl/packages/testdata/zk-crd-golden2/operator.golden index df1731ccc..cd104ce45 100644 --- a/pkg/kudoctl/packages/testdata/zk-crd-golden2/operator.golden +++ b/pkg/kudoctl/packages/testdata/zk-crd-golden2/operator.golden @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Operator metadata: labels: diff --git a/pkg/kudoctl/packages/testdata/zk-crd-golden2/operatorversion.golden b/pkg/kudoctl/packages/testdata/zk-crd-golden2/operatorversion.golden index 64b50b82f..da4a77cd9 100644 --- a/pkg/kudoctl/packages/testdata/zk-crd-golden2/operatorversion.golden +++ b/pkg/kudoctl/packages/testdata/zk-crd-golden2/operatorversion.golden @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: labels: diff --git a/pkg/kudoctl/packages/testdata/zk.tgz b/pkg/kudoctl/packages/testdata/zk.tgz index 05aabe104..b8a440393 100644 Binary files a/pkg/kudoctl/packages/testdata/zk.tgz and b/pkg/kudoctl/packages/testdata/zk.tgz differ diff --git a/pkg/kudoctl/util/kudo/install.go b/pkg/kudoctl/util/kudo/install.go index f2dd9a99f..96239275f 100644 --- a/pkg/kudoctl/util/kudo/install.go +++ b/pkg/kudoctl/util/kudo/install.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/kudoctl/clog" "github.com/kudobuilder/kudo/pkg/kudoctl/packages" ) @@ -69,7 +69,7 @@ func InstallPackage(kc *Client, resources *packages.Resources, skipInstance bool return nil } -func applyInstanceOverrides(instance *v1alpha1.Instance, instanceName string, parameters map[string]string) { +func applyInstanceOverrides(instance *v1beta1.Instance, instanceName string, parameters map[string]string) { if instanceName != "" { instance.ObjectMeta.SetName(instanceName) clog.V(3).Printf("instance name: %v", instanceName) diff --git a/pkg/kudoctl/util/kudo/install_test.go b/pkg/kudoctl/util/kudo/install_test.go index c6348ce2d..927c9cfbd 100644 --- a/pkg/kudoctl/util/kudo/install_test.go +++ b/pkg/kudoctl/util/kudo/install_test.go @@ -8,7 +8,7 @@ import ( util "github.com/kudobuilder/kudo/pkg/util/kudo" "gotest.tools/assert" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/fake" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -18,9 +18,9 @@ import ( func Test_InstallPackage(t *testing.T) { resources := packages.Resources{ - Operator: &v1alpha1.Operator{ + Operator: &v1beta1.Operator{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Operator", }, ObjectMeta: metav1.ObjectMeta{ @@ -29,13 +29,13 @@ func Test_InstallPackage(t *testing.T) { }, Name: "test", }, - Spec: v1alpha1.OperatorSpec{ + Spec: v1beta1.OperatorSpec{ KubernetesVersion: "1.15", }, }, - Instance: &v1alpha1.Instance{ + Instance: &v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Instance", }, ObjectMeta: metav1.ObjectMeta{ @@ -45,15 +45,15 @@ func Test_InstallPackage(t *testing.T) { }, Name: "test", }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: "test-1.0", }, }, }, - OperatorVersion: &v1alpha1.OperatorVersion{ + OperatorVersion: &v1beta1.OperatorVersion{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "OperatorVersion", }, ObjectMeta: metav1.ObjectMeta{ @@ -62,7 +62,7 @@ func Test_InstallPackage(t *testing.T) { }, Name: fmt.Sprintf("%s-1.0", "operator"), }, - Spec: v1alpha1.OperatorVersionSpec{ + Spec: v1beta1.OperatorVersionSpec{ Version: "1.0", }, }, @@ -70,16 +70,16 @@ func Test_InstallPackage(t *testing.T) { tests := []struct { name string - parameters []v1alpha1.Parameter + parameters []v1beta1.Parameter installParameters map[string]string skipInstance bool err string }{ - {"all parameters with defaults", []v1alpha1.Parameter{{Name: "param", Required: true, Default: util.String("aaa")}}, map[string]string{}, false, ""}, - {"missing parameter provided", []v1alpha1.Parameter{{Name: "param", Required: true}}, map[string]string{"param": "value"}, false, ""}, - {"missing parameter", []v1alpha1.Parameter{{Name: "param", Required: true, Default: nil}}, map[string]string{}, false, "missing required parameters during installation: param"}, - {"multiple missing parameter", []v1alpha1.Parameter{{Name: "param", Required: true}, {Name: "param2", Required: true}}, map[string]string{}, false, "missing required parameters during installation: param,param2"}, - {"skip instance ignores missing parameter", []v1alpha1.Parameter{{Name: "param", Required: true}}, map[string]string{}, true, ""}, + {"all parameters with defaults", []v1beta1.Parameter{{Name: "param", Required: true, Default: util.String("aaa")}}, map[string]string{}, false, ""}, + {"missing parameter provided", []v1beta1.Parameter{{Name: "param", Required: true}}, map[string]string{"param": "value"}, false, ""}, + {"missing parameter", []v1beta1.Parameter{{Name: "param", Required: true, Default: nil}}, map[string]string{}, false, "missing required parameters during installation: param"}, + {"multiple missing parameter", []v1beta1.Parameter{{Name: "param", Required: true}, {Name: "param2", Required: true}}, map[string]string{}, false, "missing required parameters during installation: param,param2"}, + {"skip instance ignores missing parameter", []v1beta1.Parameter{{Name: "param", Required: true}}, map[string]string{}, true, ""}, } for _, tt := range tests { diff --git a/pkg/kudoctl/util/kudo/kudo.go b/pkg/kudoctl/util/kudo/kudo.go index bb8069b29..b2a9468d4 100644 --- a/pkg/kudoctl/util/kudo/kudo.go +++ b/pkg/kudoctl/util/kudo/kudo.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/client/clientset/versioned" "github.com/kudobuilder/kudo/pkg/kudoctl/clog" "github.com/kudobuilder/kudo/pkg/util/kudo" @@ -47,15 +47,15 @@ func NewClient(namespace, kubeConfigPath string, requestTimeout int64) (*Client, return nil, err } - _, err = kudoClientset.KudoV1alpha1().Operators(namespace).List(v1.ListOptions{}) + _, err = kudoClientset.KudoV1beta1().Operators(namespace).List(v1.ListOptions{}) if err != nil { return nil, errors.WithMessage(err, "operators") } - _, err = kudoClientset.KudoV1alpha1().OperatorVersions(namespace).List(v1.ListOptions{}) + _, err = kudoClientset.KudoV1beta1().OperatorVersions(namespace).List(v1.ListOptions{}) if err != nil { return nil, errors.WithMessage(err, "operatorversions") } - _, err = kudoClientset.KudoV1alpha1().Instances(namespace).List(v1.ListOptions{}) + _, err = kudoClientset.KudoV1beta1().Instances(namespace).List(v1.ListOptions{}) if err != nil { return nil, errors.WithMessage(err, "instances") } @@ -74,7 +74,7 @@ func NewClientFromK8s(client versioned.Interface) *Client { // OperatorExistsInCluster checks if a given Operator object is installed on the current k8s cluster func (c *Client) OperatorExistsInCluster(name, namespace string) bool { - operator, err := c.clientset.KudoV1alpha1().Operators(namespace).Get(name, v1.GetOptions{}) + operator, err := c.clientset.KudoV1beta1().Operators(namespace).Get(name, v1.GetOptions{}) if err != nil { clog.V(2).Printf("operator.kudo.dev/%s does not exist\n", name) return false @@ -99,7 +99,7 @@ func (c *Client) OperatorExistsInCluster(name, namespace string) bool { // kudo.dev/operator: kafka // This function also just returns true if the Instance matches a specific OperatorVersion of an Operator func (c *Client) InstanceExistsInCluster(operatorName, namespace, version, instanceName string) (bool, error) { - instances, err := c.clientset.KudoV1alpha1().Instances(namespace).List(v1.ListOptions{LabelSelector: fmt.Sprintf("%s=%s", kudo.OperatorLabel, operatorName)}) + instances, err := c.clientset.KudoV1beta1().Instances(namespace).List(v1.ListOptions{LabelSelector: fmt.Sprintf("%s=%s", kudo.OperatorLabel, operatorName)}) if err != nil { return false, err } @@ -124,8 +124,8 @@ func (c *Client) InstanceExistsInCluster(operatorName, namespace, version, insta // GetInstance queries kubernetes api for instance of given name in given namespace // returns error for error conditions. Instance not found is not considered an error and will result in 'nil, nil' -func (c *Client) GetInstance(name, namespace string) (*v1alpha1.Instance, error) { - instance, err := c.clientset.KudoV1alpha1().Instances(namespace).Get(name, v1.GetOptions{}) +func (c *Client) GetInstance(name, namespace string) (*v1beta1.Instance, error) { + instance, err := c.clientset.KudoV1beta1().Instances(namespace).Get(name, v1.GetOptions{}) if apierrors.IsNotFound(err) { return nil, nil } @@ -134,8 +134,8 @@ func (c *Client) GetInstance(name, namespace string) (*v1alpha1.Instance, error) // GetOperatorVersion queries kubernetes api for operatorversion of given name in given namespace // returns error for all other errors that not found, not found is treated as result being 'nil, nil' -func (c *Client) GetOperatorVersion(name, namespace string) (*v1alpha1.OperatorVersion, error) { - ov, err := c.clientset.KudoV1alpha1().OperatorVersions(namespace).Get(name, v1.GetOptions{}) +func (c *Client) GetOperatorVersion(name, namespace string) (*v1beta1.OperatorVersion, error) { + ov, err := c.clientset.KudoV1beta1().OperatorVersions(namespace).Get(name, v1.GetOptions{}) if apierrors.IsNotFound(err) { return nil, nil } @@ -144,7 +144,7 @@ func (c *Client) GetOperatorVersion(name, namespace string) (*v1alpha1.OperatorV // UpdateInstance updates operatorversion on instance func (c *Client) UpdateInstance(instanceName, namespace string, operatorVersionName *string, parameters map[string]string) error { - instanceSpec := v1alpha1.InstanceSpec{} + instanceSpec := v1beta1.InstanceSpec{} if operatorVersionName != nil { instanceSpec.OperatorVersion = v1core.ObjectReference{ Name: kudo.StringValue(operatorVersionName), @@ -154,20 +154,20 @@ func (c *Client) UpdateInstance(instanceName, namespace string, operatorVersionN instanceSpec.Parameters = parameters } serializedPatch, err := json.Marshal(struct { - Spec *v1alpha1.InstanceSpec `json:"spec"` + Spec *v1beta1.InstanceSpec `json:"spec"` }{ &instanceSpec, }) if err != nil { return err } - _, err = c.clientset.KudoV1alpha1().Instances(namespace).Patch(instanceName, types.MergePatchType, serializedPatch) + _, err = c.clientset.KudoV1beta1().Instances(namespace).Patch(instanceName, types.MergePatchType, serializedPatch) return err } // ListInstances lists all instances of given operator installed in the cluster in a given ns func (c *Client) ListInstances(namespace string) ([]string, error) { - instances, err := c.clientset.KudoV1alpha1().Instances(namespace).List(v1.ListOptions{}) + instances, err := c.clientset.KudoV1beta1().Instances(namespace).List(v1.ListOptions{}) if err != nil { return nil, err } @@ -181,7 +181,7 @@ func (c *Client) ListInstances(namespace string) ([]string, error) { // OperatorVersionsInstalled lists all the versions of given operator installed in the cluster in given ns func (c *Client) OperatorVersionsInstalled(operatorName, namespace string) ([]string, error) { - ov, err := c.clientset.KudoV1alpha1().OperatorVersions(namespace).List(v1.ListOptions{}) + ov, err := c.clientset.KudoV1beta1().OperatorVersions(namespace).List(v1.ListOptions{}) if err != nil { return nil, err } @@ -196,8 +196,8 @@ func (c *Client) OperatorVersionsInstalled(operatorName, namespace string) ([]st } // InstallOperatorObjToCluster expects a valid Operator obj to install -func (c *Client) InstallOperatorObjToCluster(obj *v1alpha1.Operator, namespace string) (*v1alpha1.Operator, error) { - createdObj, err := c.clientset.KudoV1alpha1().Operators(namespace).Create(obj) +func (c *Client) InstallOperatorObjToCluster(obj *v1beta1.Operator, namespace string) (*v1beta1.Operator, error) { + createdObj, err := c.clientset.KudoV1beta1().Operators(namespace).Create(obj) if err != nil { return nil, errors.WithMessage(err, "installing Operator") } @@ -205,8 +205,8 @@ func (c *Client) InstallOperatorObjToCluster(obj *v1alpha1.Operator, namespace s } // InstallOperatorVersionObjToCluster expects a valid Operator obj to install -func (c *Client) InstallOperatorVersionObjToCluster(obj *v1alpha1.OperatorVersion, namespace string) (*v1alpha1.OperatorVersion, error) { - createdObj, err := c.clientset.KudoV1alpha1().OperatorVersions(namespace).Create(obj) +func (c *Client) InstallOperatorVersionObjToCluster(obj *v1beta1.OperatorVersion, namespace string) (*v1beta1.OperatorVersion, error) { + createdObj, err := c.clientset.KudoV1beta1().OperatorVersions(namespace).Create(obj) if err != nil { return nil, errors.WithMessage(err, "installing OperatorVersion") } @@ -214,8 +214,8 @@ func (c *Client) InstallOperatorVersionObjToCluster(obj *v1alpha1.OperatorVersio } // InstallInstanceObjToCluster expects a valid Instance obj to install -func (c *Client) InstallInstanceObjToCluster(obj *v1alpha1.Instance, namespace string) (*v1alpha1.Instance, error) { - createdObj, err := c.clientset.KudoV1alpha1().Instances(namespace).Create(obj) +func (c *Client) InstallInstanceObjToCluster(obj *v1beta1.Instance, namespace string) (*v1beta1.Instance, error) { + createdObj, err := c.clientset.KudoV1beta1().Instances(namespace).Create(obj) if err != nil { return nil, errors.WithMessage(err, "installing Instance") } @@ -230,12 +230,12 @@ func (c *Client) DeleteInstance(instanceName, namespace string) error { PropagationPolicy: &propagationPolicy, } - return c.clientset.KudoV1alpha1().Instances(namespace).Delete(instanceName, options) + return c.clientset.KudoV1beta1().Instances(namespace).Delete(instanceName, options) } // ValidateServerForOperator validates that the k8s server version and kudo version are valid for operator // error message will provide detail of failure, otherwise nil -func (c *Client) ValidateServerForOperator(operator *v1alpha1.Operator) error { +func (c *Client) ValidateServerForOperator(operator *v1beta1.Operator) error { expectedKubver, err := version.New(operator.Spec.KubernetesVersion) if err != nil { return fmt.Errorf("unable to parse operators kubernetes version: %w", err) diff --git a/pkg/kudoctl/util/kudo/kudo_test.go b/pkg/kudoctl/util/kudo/kudo_test.go index 8825513ef..dd92b6f3a 100644 --- a/pkg/kudoctl/util/kudo/kudo_test.go +++ b/pkg/kudoctl/util/kudo/kudo_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/fake" "github.com/kudobuilder/kudo/pkg/util/kudo" util "github.com/kudobuilder/kudo/pkg/util/kudo" @@ -35,9 +35,9 @@ func TestNewK2oClient(t *testing.T) { func TestKudoClient_OperatorExistsInCluster(t *testing.T) { - obj := v1alpha1.Operator{ + obj := v1beta1.Operator{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Operator", }, ObjectMeta: metav1.ObjectMeta{ @@ -53,7 +53,7 @@ func TestKudoClient_OperatorExistsInCluster(t *testing.T) { err string createns string getns string - obj *v1alpha1.Operator + obj *v1beta1.Operator }{ {false, "", "", "", nil}, // 1 {false, "", "default", "default", nil}, // 2 @@ -66,7 +66,7 @@ func TestKudoClient_OperatorExistsInCluster(t *testing.T) { k2o := newTestSimpleK2o() // create Operator - _, err := k2o.clientset.KudoV1alpha1().Operators(tt.createns).Create(tt.obj) + _, err := k2o.clientset.KudoV1beta1().Operators(tt.createns).Create(tt.obj) if err != nil { if err.Error() != "object does not implement the Object interfaces" { t.Errorf("unexpected error: %+v", err) @@ -83,9 +83,9 @@ func TestKudoClient_OperatorExistsInCluster(t *testing.T) { } func TestKudoClient_InstanceExistsInCluster(t *testing.T) { - obj := v1alpha1.Instance{ + obj := v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Instance", }, ObjectMeta: metav1.ObjectMeta{ @@ -95,16 +95,16 @@ func TestKudoClient_InstanceExistsInCluster(t *testing.T) { }, Name: "test", }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: "test-1.0", }, }, } - wrongObj := v1alpha1.Instance{ + wrongObj := v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Instance", }, ObjectMeta: metav1.ObjectMeta{ @@ -114,7 +114,7 @@ func TestKudoClient_InstanceExistsInCluster(t *testing.T) { }, Name: "test", }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: "test-0.9", }, @@ -128,7 +128,7 @@ func TestKudoClient_InstanceExistsInCluster(t *testing.T) { instanceExists bool namespace string instanceName string - obj *v1alpha1.Instance + obj *v1beta1.Instance }{ {"no existing instance in cluster", false, "", "", nil}, // 1 {"same namespace and instance name", true, instanceNamespace, obj.ObjectMeta.Name, &obj}, // 3 @@ -141,7 +141,7 @@ func TestKudoClient_InstanceExistsInCluster(t *testing.T) { // create Instance if tt.obj != nil { - _, err := k2o.clientset.KudoV1alpha1().Instances(instanceNamespace).Create(tt.obj) + _, err := k2o.clientset.KudoV1beta1().Instances(instanceNamespace).Create(tt.obj) if err != nil { t.Fatalf("%s: Error during test setup, cannot create test instance %v", tt.name, err) } @@ -157,9 +157,9 @@ func TestKudoClient_InstanceExistsInCluster(t *testing.T) { } func TestKudoClient_ListInstances(t *testing.T) { - obj := v1alpha1.Instance{ + obj := v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Instance", }, ObjectMeta: metav1.ObjectMeta{ @@ -169,7 +169,7 @@ func TestKudoClient_ListInstances(t *testing.T) { }, Name: "test", }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: "test-1.0", }, @@ -180,7 +180,7 @@ func TestKudoClient_ListInstances(t *testing.T) { tests := []struct { expectedInstances []string namespace string - obj *v1alpha1.Instance + obj *v1beta1.Instance }{ {[]string{}, installNamespace, nil}, // 1 {[]string{obj.Name}, installNamespace, &obj}, // 2 @@ -192,7 +192,7 @@ func TestKudoClient_ListInstances(t *testing.T) { // create Instance if tt.obj != nil { - _, err := k2o.clientset.KudoV1alpha1().Instances(installNamespace).Create(tt.obj) + _, err := k2o.clientset.KudoV1beta1().Instances(installNamespace).Create(tt.obj) if err != nil { t.Errorf("%d: Error creating instance in tests setup", i+1) } @@ -208,9 +208,9 @@ func TestKudoClient_ListInstances(t *testing.T) { func TestKudoClient_OperatorVersionsInstalled(t *testing.T) { operatorName := "test" - obj := v1alpha1.OperatorVersion{ + obj := v1beta1.OperatorVersion{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "OperatorVersion", }, ObjectMeta: metav1.ObjectMeta{ @@ -219,7 +219,7 @@ func TestKudoClient_OperatorVersionsInstalled(t *testing.T) { }, Name: fmt.Sprintf("%s-1.0", operatorName), }, - Spec: v1alpha1.OperatorVersionSpec{ + Spec: v1beta1.OperatorVersionSpec{ Version: "1.0", }, } @@ -229,7 +229,7 @@ func TestKudoClient_OperatorVersionsInstalled(t *testing.T) { name string expectedVersions []string namespace string - obj *v1alpha1.OperatorVersion + obj *v1beta1.OperatorVersion }{ {"no operator version defined", []string{}, installNamespace, nil}, {"operator version exists in the same namespace", []string{obj.Spec.Version}, installNamespace, &obj}, @@ -241,7 +241,7 @@ func TestKudoClient_OperatorVersionsInstalled(t *testing.T) { // create Instance if tt.obj != nil { - _, err := k2o.clientset.KudoV1alpha1().OperatorVersions(installNamespace).Create(tt.obj) + _, err := k2o.clientset.KudoV1beta1().OperatorVersions(installNamespace).Create(tt.obj) if err != nil { t.Errorf("Error creating operator version in tests setup for %s", tt.name) } @@ -256,9 +256,9 @@ func TestKudoClient_OperatorVersionsInstalled(t *testing.T) { } func TestKudoClient_InstallOperatorObjToCluster(t *testing.T) { - obj := v1alpha1.Operator{ + obj := v1beta1.Operator{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Operator", }, ObjectMeta: metav1.ObjectMeta{ @@ -273,7 +273,7 @@ func TestKudoClient_InstallOperatorObjToCluster(t *testing.T) { name string err string createns string - obj *v1alpha1.Operator + obj *v1beta1.Operator }{ {"", "operators.kudo.dev \"\" not found", "", nil}, // 1 {"", "operators.kudo.dev \"\" not found", "default", nil}, // 2 @@ -286,12 +286,12 @@ func TestKudoClient_InstallOperatorObjToCluster(t *testing.T) { k2o := newTestSimpleK2o() // create Operator - k2o.clientset.KudoV1alpha1().Operators(tt.createns).Create(tt.obj) //nolint + k2o.clientset.KudoV1beta1().Operators(tt.createns).Create(tt.obj) //nolint // test if Operator exists in namespace k2o.InstallOperatorObjToCluster(tt.obj, tt.createns) //nolint - _, err := k2o.clientset.KudoV1alpha1().Operators(tt.createns).Get(tt.name, metav1.GetOptions{}) + _, err := k2o.clientset.KudoV1beta1().Operators(tt.createns).Get(tt.name, metav1.GetOptions{}) if tt.err != "" { assert.ErrorContains(t, err, tt.err, "failure in %v test case", i+1) } @@ -299,9 +299,9 @@ func TestKudoClient_InstallOperatorObjToCluster(t *testing.T) { } func TestKudoClient_InstallOperatorVersionObjToCluster(t *testing.T) { - obj := v1alpha1.OperatorVersion{ + obj := v1beta1.OperatorVersion{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "OperatorVersion", }, ObjectMeta: metav1.ObjectMeta{ @@ -316,7 +316,7 @@ func TestKudoClient_InstallOperatorVersionObjToCluster(t *testing.T) { name string err string createns string - obj *v1alpha1.OperatorVersion + obj *v1beta1.OperatorVersion }{ {"", "operatorversions.kudo.dev \"\" not found", "", nil}, // 1 {"", "operatorversions.kudo.dev \"\" not found", "default", nil}, // 2 @@ -329,12 +329,12 @@ func TestKudoClient_InstallOperatorVersionObjToCluster(t *testing.T) { k2o := newTestSimpleK2o() // create Operator - k2o.clientset.KudoV1alpha1().OperatorVersions(tt.createns).Create(tt.obj) //nolint + k2o.clientset.KudoV1beta1().OperatorVersions(tt.createns).Create(tt.obj) //nolint // test if Operator exists in namespace k2o.InstallOperatorVersionObjToCluster(tt.obj, tt.createns) //nolint - _, err := k2o.clientset.KudoV1alpha1().OperatorVersions(tt.createns).Get(tt.name, metav1.GetOptions{}) + _, err := k2o.clientset.KudoV1beta1().OperatorVersions(tt.createns).Get(tt.name, metav1.GetOptions{}) if tt.err != "" { assert.ErrorContains(t, err, tt.err, "failure in %v test case", i+1) } @@ -342,9 +342,9 @@ func TestKudoClient_InstallOperatorVersionObjToCluster(t *testing.T) { } func TestKudoClient_InstallInstanceObjToCluster(t *testing.T) { - obj := v1alpha1.Instance{ + obj := v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "OperatorVersion", }, ObjectMeta: metav1.ObjectMeta{ @@ -359,7 +359,7 @@ func TestKudoClient_InstallInstanceObjToCluster(t *testing.T) { name string err string createns string - obj *v1alpha1.Instance + obj *v1beta1.Instance }{ {"", "instances.kudo.dev \"\" not found", "", nil}, // 1 {"", "instances.kudo.dev \"\" not found", "default", nil}, // 2 @@ -372,12 +372,12 @@ func TestKudoClient_InstallInstanceObjToCluster(t *testing.T) { k2o := newTestSimpleK2o() // create Operator - k2o.clientset.KudoV1alpha1().Instances(tt.createns).Create(tt.obj) //nolint + k2o.clientset.KudoV1beta1().Instances(tt.createns).Create(tt.obj) //nolint // test if Operator exists in namespace k2o.InstallInstanceObjToCluster(tt.obj, tt.createns) //nolint - _, err := k2o.clientset.KudoV1alpha1().Instances(tt.createns).Get(tt.name, metav1.GetOptions{}) + _, err := k2o.clientset.KudoV1beta1().Instances(tt.createns).Get(tt.name, metav1.GetOptions{}) if tt.err != "" { assert.ErrorContains(t, err, tt.err, "failure in %v test case", i+1) } @@ -385,9 +385,9 @@ func TestKudoClient_InstallInstanceObjToCluster(t *testing.T) { } func TestKudoClient_GetInstance(t *testing.T) { - testInstance := v1alpha1.Instance{ + testInstance := v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Instance", }, ObjectMeta: metav1.ObjectMeta{ @@ -397,7 +397,7 @@ func TestKudoClient_GetInstance(t *testing.T) { }, Name: "test", }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: "test-1.0", }, @@ -409,7 +409,7 @@ func TestKudoClient_GetInstance(t *testing.T) { name string found bool namespaceToQuery string - storedInstance *v1alpha1.Instance + storedInstance *v1beta1.Instance }{ {"no instance exists", false, installNamespace, nil}, // 1 {"instance exists", true, installNamespace, &testInstance}, // 2 @@ -421,7 +421,7 @@ func TestKudoClient_GetInstance(t *testing.T) { // create Instance if tt.storedInstance != nil { - _, err := k2o.clientset.KudoV1alpha1().Instances(installNamespace).Create(tt.storedInstance) + _, err := k2o.clientset.KudoV1beta1().Instances(installNamespace).Create(tt.storedInstance) if err != nil { t.Errorf("%d: Error creating instance in tests setup", i+1) } @@ -437,9 +437,9 @@ func TestKudoClient_GetInstance(t *testing.T) { func TestKudoClient_GetOperatorVersion(t *testing.T) { operatorName := "test" - testOv := v1alpha1.OperatorVersion{ + testOv := v1beta1.OperatorVersion{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "OperatorVersion", }, ObjectMeta: metav1.ObjectMeta{ @@ -448,7 +448,7 @@ func TestKudoClient_GetOperatorVersion(t *testing.T) { }, Name: fmt.Sprintf("%s-1.0", operatorName), }, - Spec: v1alpha1.OperatorVersionSpec{ + Spec: v1beta1.OperatorVersionSpec{ Version: "1.0", }, } @@ -458,7 +458,7 @@ func TestKudoClient_GetOperatorVersion(t *testing.T) { name string found bool namespace string - storedOv *v1alpha1.OperatorVersion + storedOv *v1beta1.OperatorVersion }{ {"no operator version defined", false, installNamespace, nil}, {"operator version exists in the same namespace", true, installNamespace, &testOv}, @@ -470,7 +470,7 @@ func TestKudoClient_GetOperatorVersion(t *testing.T) { // create Instance if tt.storedOv != nil { - _, err := k2o.clientset.KudoV1alpha1().OperatorVersions(installNamespace).Create(tt.storedOv) + _, err := k2o.clientset.KudoV1beta1().OperatorVersions(installNamespace).Create(tt.storedOv) if err != nil { t.Errorf("Error creating operator version in tests setup for %s", tt.name) } @@ -485,9 +485,9 @@ func TestKudoClient_GetOperatorVersion(t *testing.T) { } func TestKudoClient_UpdateOperatorVersion(t *testing.T) { - testInstance := v1alpha1.Instance{ + testInstance := v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Instance", }, ObjectMeta: metav1.ObjectMeta{ @@ -497,7 +497,7 @@ func TestKudoClient_UpdateOperatorVersion(t *testing.T) { }, Name: "test", }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: "test-1.0", }, @@ -525,7 +525,7 @@ func TestKudoClient_UpdateOperatorVersion(t *testing.T) { // create Instance instanceToCreate := testInstance instanceToCreate.Spec.Parameters = tt.existingParameters - _, err := k2o.clientset.KudoV1alpha1().Instances(installNamespace).Create(&instanceToCreate) + _, err := k2o.clientset.KudoV1beta1().Instances(installNamespace).Create(&instanceToCreate) if err != nil { t.Errorf("Error creating operator version in tests setup for %s", tt.name) } @@ -565,9 +565,9 @@ func TestKudoClient_UpdateOperatorVersion(t *testing.T) { } func TestKudoClient_DeleteInstance(t *testing.T) { - testInstance := v1alpha1.Instance{ + testInstance := v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Instance", }, ObjectMeta: metav1.ObjectMeta{ @@ -576,7 +576,7 @@ func TestKudoClient_DeleteInstance(t *testing.T) { }, Name: "test", }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: "test-1.0", }, @@ -598,7 +598,7 @@ func TestKudoClient_DeleteInstance(t *testing.T) { for _, test := range tests { k2o := newTestSimpleK2o() - _, err := k2o.clientset.KudoV1alpha1().Instances(installNamespace).Create(&testInstance) + _, err := k2o.clientset.KudoV1beta1().Instances(installNamespace).Create(&testInstance) if err != nil { t.Fatalf("error creating instance in tests setup for") } diff --git a/pkg/kudoctl/util/kudo/upgrade.go b/pkg/kudoctl/util/kudo/upgrade.go index 48865b086..bfb721ea7 100644 --- a/pkg/kudoctl/util/kudo/upgrade.go +++ b/pkg/kudoctl/util/kudo/upgrade.go @@ -3,7 +3,7 @@ package kudo import ( "fmt" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/kudoctl/clog" util "github.com/kudobuilder/kudo/pkg/util/kudo" @@ -12,7 +12,7 @@ import ( // UpgradeOperatorVersion upgrades an OperatorVersion and its Instance. // For the updated Instance, new parameters can be provided. -func UpgradeOperatorVersion(kc *Client, newOv *v1alpha1.OperatorVersion, instanceName, namespace string, parameters map[string]string) error { +func UpgradeOperatorVersion(kc *Client, newOv *v1beta1.OperatorVersion, instanceName, namespace string, parameters map[string]string) error { operatorName := newOv.Spec.Operator.Name instance, err := kc.GetInstance(instanceName, namespace) diff --git a/pkg/kudoctl/util/kudo/upgrade_test.go b/pkg/kudoctl/util/kudo/upgrade_test.go index 3085c6653..841427f81 100644 --- a/pkg/kudoctl/util/kudo/upgrade_test.go +++ b/pkg/kudoctl/util/kudo/upgrade_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/client/clientset/versioned/fake" util "github.com/kudobuilder/kudo/pkg/util/kudo" @@ -14,9 +14,9 @@ import ( ) func Test_UpgradeOperatorVersion(t *testing.T) { - testOv := v1alpha1.OperatorVersion{ + testOv := v1beta1.OperatorVersion{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "OperatorVersion", }, ObjectMeta: metav1.ObjectMeta{ @@ -25,7 +25,7 @@ func Test_UpgradeOperatorVersion(t *testing.T) { }, Name: "test-1.0", }, - Spec: v1alpha1.OperatorVersionSpec{ + Spec: v1beta1.OperatorVersionSpec{ Version: "1.0", Operator: v1.ObjectReference{ Name: "test", @@ -33,9 +33,9 @@ func Test_UpgradeOperatorVersion(t *testing.T) { }, } - testInstance := v1alpha1.Instance{ + testInstance := v1beta1.Instance{ TypeMeta: metav1.TypeMeta{ - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", Kind: "Instance", }, ObjectMeta: metav1.ObjectMeta{ @@ -45,7 +45,7 @@ func Test_UpgradeOperatorVersion(t *testing.T) { }, Name: "test", }, - Spec: v1alpha1.InstanceSpec{ + Spec: v1beta1.InstanceSpec{ OperatorVersion: v1.ObjectReference{ Name: "test-1.0", }, diff --git a/pkg/kudoctl/util/repo/index_test.go b/pkg/kudoctl/util/repo/index_test.go index 14dc3ddfd..61a595bd3 100644 --- a/pkg/kudoctl/util/repo/index_test.go +++ b/pkg/kudoctl/util/repo/index_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/kudoctl/packages" "github.com/magiconair/properties/assert" @@ -23,20 +23,20 @@ func TestParseIndexFile(t *testing.T) { apiVersion: v1 entries: flink: - - apiVersion: v1alpha1 + - apiVersion: v1beta1 appVersion: 1.7.2 name: flink urls: - https://kudo-repository.storage.googleapis.com/flink-0.1.0.tgz version: 0.1.0 kafka: - - apiVersion: v1alpha1 + - apiVersion: v1beta1 appVersion: 2.2.1 name: kafka urls: - https://kudo-repository.storage.googleapis.com/kafka-0.1.0.tgz version: 0.1.0 - - apiVersion: v1alpha1 + - apiVersion: v1beta1 appVersion: 2.3.0 name: kafka urls: @@ -124,7 +124,7 @@ func getTestPackageVersion(name string, version string) PackageVersion { Version: version, AppVersion: "0.7.0", Description: "fancy description is here", - Maintainers: []*v1alpha1.Maintainer{ + Maintainers: []*v1beta1.Maintainer{ {Name: "Fabian Baier", Email: ""}, {Name: "Tom Runyon", Email: ""}, {Name: "Ken Sipe", Email: ""}}, @@ -167,14 +167,14 @@ func TestAddPackageVersionErrorConditions(t *testing.T) { func TestMapPackageFileToPackageVersion(t *testing.T) { o := packages.Operator{ - APIVersion: packages.ServerAPIVersion, + APIVersion: packages.APIVersion, Name: "kafka", Description: "", Version: "1.0.0", AppVersion: "2.2.2", KUDOVersion: "0.5.0", KubernetesVersion: "1.15", - Maintainers: []*v1alpha1.Maintainer{{Name: "Ken Sipe"}}, + Maintainers: []*v1beta1.Maintainer{{Name: "Ken Sipe"}}, URL: "http://kudo.dev/kafka", } pf := packages.PackageFiles{ diff --git a/pkg/kudoctl/util/repo/repo.go b/pkg/kudoctl/util/repo/repo.go index 7ffee18cc..2931630f8 100644 --- a/pkg/kudoctl/util/repo/repo.go +++ b/pkg/kudoctl/util/repo/repo.go @@ -7,7 +7,7 @@ import ( "github.com/kudobuilder/kudo/pkg/kudoctl/clog" - "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/kudobuilder/kudo/pkg/kudoctl/kudohome" "github.com/spf13/afero" @@ -189,5 +189,5 @@ type Metadata struct { Description string `json:"description,omitempty"` // Maintainers is a list of name and URL/email addresses of the maintainer(s). - Maintainers []*v1alpha1.Maintainer `json:"maintainers,omitempty"` + Maintainers []*v1beta1.Maintainer `json:"maintainers,omitempty"` } diff --git a/pkg/test/case_test.go b/pkg/test/case_test.go index f7cf72a5e..cb8bdc799 100644 --- a/pkg/test/case_test.go +++ b/pkg/test/case_test.go @@ -3,7 +3,7 @@ package test import ( "testing" - kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" testutils "github.com/kudobuilder/kudo/pkg/test/utils" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" @@ -31,7 +31,7 @@ func TestLoadTestSteps(t *testing.T) { }, TypeMeta: metav1.TypeMeta{ Kind: "TestStep", - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", }, Index: 0, }, @@ -59,7 +59,7 @@ func TestLoadTestSteps(t *testing.T) { Step: &kudo.TestStep{ TypeMeta: metav1.TypeMeta{ Kind: "TestStep", - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", }, Index: 1, Delete: []kudo.ObjectReference{ @@ -75,7 +75,7 @@ func TestLoadTestSteps(t *testing.T) { Assert: &kudo.TestAssert{ TypeMeta: metav1.TypeMeta{ Kind: "TestAssert", - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", }, Timeout: 20, }, @@ -134,7 +134,7 @@ func TestLoadTestSteps(t *testing.T) { }, TypeMeta: metav1.TypeMeta{ Kind: "TestStep", - APIVersion: "kudo.dev/v1alpha1", + APIVersion: "kudo.dev/v1beta1", }, Index: 3, }, diff --git a/pkg/test/harness.go b/pkg/test/harness.go index b58de9cd4..6225a1f01 100644 --- a/pkg/test/harness.go +++ b/pkg/test/harness.go @@ -17,7 +17,7 @@ import ( volumetypes "github.com/docker/docker/api/types/volume" docker "github.com/docker/docker/client" - kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" testutils "github.com/kudobuilder/kudo/pkg/test/utils" "k8s.io/client-go/discovery" "k8s.io/client-go/rest" diff --git a/pkg/test/harness_integration_test.go b/pkg/test/harness_integration_test.go index 70dc429af..366e4bd2c 100644 --- a/pkg/test/harness_integration_test.go +++ b/pkg/test/harness_integration_test.go @@ -5,7 +5,7 @@ package test import ( "testing" - kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" ) func TestHarnessRunIntegration(t *testing.T) { diff --git a/pkg/test/step.go b/pkg/test/step.go index 8633f429b..fc31cd568 100644 --- a/pkg/test/step.go +++ b/pkg/test/step.go @@ -7,7 +7,7 @@ import ( "regexp" "time" - kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" testutils "github.com/kudobuilder/kudo/pkg/test/utils" "github.com/pkg/errors" k8serrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/pkg/test/step_integration_test.go b/pkg/test/step_integration_test.go index 01ff06bd9..b48da5b38 100644 --- a/pkg/test/step_integration_test.go +++ b/pkg/test/step_integration_test.go @@ -13,7 +13,7 @@ import ( petname "github.com/dustinkirkland/golang-petname" - kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" testutils "github.com/kudobuilder/kudo/pkg/test/utils" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" diff --git a/pkg/test/step_test.go b/pkg/test/step_test.go index 14c9fa61d..d56a7ce34 100644 --- a/pkg/test/step_test.go +++ b/pkg/test/step_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" testutils "github.com/kudobuilder/kudo/pkg/test/utils" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" diff --git a/pkg/test/test_data/cli-test/00-create-pod.yaml b/pkg/test/test_data/cli-test/00-create-pod.yaml index 6a5841ffb..a360c73e7 100644 --- a/pkg/test/test_data/cli-test/00-create-pod.yaml +++ b/pkg/test/test_data/cli-test/00-create-pod.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - apply -f ./test_data/pod.yaml diff --git a/pkg/test/test_data/cli-test/01-patch.yaml b/pkg/test/test_data/cli-test/01-patch.yaml index a6471c36c..76cdaa8eb 100644 --- a/pkg/test/test_data/cli-test/01-patch.yaml +++ b/pkg/test/test_data/cli-test/01-patch.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep commands: - command: kubectl label pod cli-test-pod test=true diff --git a/pkg/test/test_data/crd-in-step/00-assert.yaml b/pkg/test/test_data/crd-in-step/00-assert.yaml index 071e5cae4..308e9728a 100644 --- a/pkg/test/test_data/crd-in-step/00-assert.yaml +++ b/pkg/test/test_data/crd-in-step/00-assert.yaml @@ -10,4 +10,4 @@ status: plural: mycrds singular: mycrd storedVersions: - - v1alpha1 + - v1beta1 diff --git a/pkg/test/test_data/crd-in-step/00-crd.yaml b/pkg/test/test_data/crd-in-step/00-crd.yaml index bdb82655a..2a9b8d08d 100644 --- a/pkg/test/test_data/crd-in-step/00-crd.yaml +++ b/pkg/test/test_data/crd-in-step/00-crd.yaml @@ -5,7 +5,7 @@ metadata: name: mycrds.mycrd.k8s.io spec: group: mycrd.k8s.io - version: v1alpha1 + version: v1beta1 names: kind: MyCRD listKind: MyCRDList diff --git a/pkg/test/test_data/crd-in-step/01-assert.yaml b/pkg/test/test_data/crd-in-step/01-assert.yaml index eb9f4d43f..3da40dedf 100644 --- a/pkg/test/test_data/crd-in-step/01-assert.yaml +++ b/pkg/test/test_data/crd-in-step/01-assert.yaml @@ -1,5 +1,5 @@ # Make sure that the instance we made gets created -apiVersion: mycrd.k8s.io/v1alpha1 +apiVersion: mycrd.k8s.io/v1beta1 kind: MyCRD metadata: name: my-crd diff --git a/pkg/test/test_data/crd-in-step/01-create-mycrd.yaml b/pkg/test/test_data/crd-in-step/01-create-mycrd.yaml index 5156e0496..14f870738 100644 --- a/pkg/test/test_data/crd-in-step/01-create-mycrd.yaml +++ b/pkg/test/test_data/crd-in-step/01-create-mycrd.yaml @@ -1,5 +1,5 @@ # Try to use the CRD we just created. -apiVersion: mycrd.k8s.io/v1alpha1 +apiVersion: mycrd.k8s.io/v1beta1 kind: MyCRD metadata: name: my-crd diff --git a/pkg/test/test_data/create-or-update/01-assert.yaml b/pkg/test/test_data/create-or-update/01-assert.yaml index a84ccec16..e9c546e36 100644 --- a/pkg/test/test_data/create-or-update/01-assert.yaml +++ b/pkg/test/test_data/create-or-update/01-assert.yaml @@ -32,7 +32,7 @@ spec: ports: - containerPort: 80 --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: my-instance diff --git a/pkg/test/test_data/create-or-update/01-create-known-crd.yaml b/pkg/test/test_data/create-or-update/01-create-known-crd.yaml index 9621ff457..a4d8f13f8 100644 --- a/pkg/test/test_data/create-or-update/01-create-known-crd.yaml +++ b/pkg/test/test_data/create-or-update/01-create-known-crd.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: my-instance diff --git a/pkg/test/test_data/create-or-update/02-assert.yaml b/pkg/test/test_data/create-or-update/02-assert.yaml index baa0aecb4..3bf0424ca 100644 --- a/pkg/test/test_data/create-or-update/02-assert.yaml +++ b/pkg/test/test_data/create-or-update/02-assert.yaml @@ -20,7 +20,7 @@ spec: ports: - containerPort: 80 --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: my-instance diff --git a/pkg/test/test_data/create-or-update/02-update-known-crd.yaml b/pkg/test/test_data/create-or-update/02-update-known-crd.yaml index acee86198..11b16dae1 100644 --- a/pkg/test/test_data/create-or-update/02-update-known-crd.yaml +++ b/pkg/test/test_data/create-or-update/02-update-known-crd.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: my-instance diff --git a/pkg/test/test_data/delete-in-step/01-create.yaml b/pkg/test/test_data/delete-in-step/01-create.yaml index 122b73c57..6074d6b03 100644 --- a/pkg/test/test_data/delete-in-step/01-create.yaml +++ b/pkg/test/test_data/delete-in-step/01-create.yaml @@ -1,6 +1,6 @@ # Delete all pods and then make sure that we can make pods with the same name but different specs (this would fail if they were # not deleted). -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep delete: - apiVersion: v1 diff --git a/pkg/test/test_data/with-overrides/00-test-step.yaml b/pkg/test/test_data/with-overrides/00-test-step.yaml index bc2b247ae..4e28de3b9 100644 --- a/pkg/test/test_data/with-overrides/00-test-step.yaml +++ b/pkg/test/test_data/with-overrides/00-test-step.yaml @@ -8,7 +8,7 @@ spec: - name: nginx image: nginx:1.7.9 --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep metadata: name: with-test-step-name-override diff --git a/pkg/test/test_data/with-overrides/01-assert.yaml b/pkg/test/test_data/with-overrides/01-assert.yaml index ffc92ea43..75a5bc684 100644 --- a/pkg/test/test_data/with-overrides/01-assert.yaml +++ b/pkg/test/test_data/with-overrides/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestAssert timeout: 20 --- diff --git a/pkg/test/test_data/with-overrides/01-test-assert.yaml b/pkg/test/test_data/with-overrides/01-test-assert.yaml index 898d12d90..cf7b8541b 100644 --- a/pkg/test/test_data/with-overrides/01-test-assert.yaml +++ b/pkg/test/test_data/with-overrides/01-test-assert.yaml @@ -8,7 +8,7 @@ spec: - name: nginx image: nginx:1.7.9 --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep delete: - apiVersion: v1 diff --git a/pkg/test/test_data/with-overrides/03-pod.yaml b/pkg/test/test_data/with-overrides/03-pod.yaml index 9d3ad92d8..0a3bd8d9d 100644 --- a/pkg/test/test_data/with-overrides/03-pod.yaml +++ b/pkg/test/test_data/with-overrides/03-pod.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep metadata: name: name-overridden diff --git a/pkg/test/utils/kubernetes.go b/pkg/test/utils/kubernetes.go index fd8e43046..231f1d6ae 100644 --- a/pkg/test/utils/kubernetes.go +++ b/pkg/test/utils/kubernetes.go @@ -20,7 +20,7 @@ import ( "github.com/google/shlex" "github.com/kudobuilder/kudo/pkg/apis" - kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/pkg/errors" "github.com/pmezard/go-difflib/difflib" corev1 "k8s.io/api/core/v1" diff --git a/pkg/test/utils/kubernetes_integration_test.go b/pkg/test/utils/kubernetes_integration_test.go index 8781f109f..7f0e071c4 100644 --- a/pkg/test/utils/kubernetes_integration_test.go +++ b/pkg/test/utils/kubernetes_integration_test.go @@ -76,7 +76,7 @@ func TestWaitForCRDs(t *testing.T) { }) assert.Nil(t, err) - instance := NewResource("kudo.dev/v1alpha1", "Instance", "zk", "ns") + instance := NewResource("kudo.dev/v1beta1", "Instance", "zk", "ns") // Verify that we cannot create the instance, because the test environment is empty. assert.IsType(t, &meta.NoKindMatchError{}, testClient.Create(context.TODO(), instance)) diff --git a/pkg/test/utils/kubernetes_test.go b/pkg/test/utils/kubernetes_test.go index a828224ac..c717ef485 100644 --- a/pkg/test/utils/kubernetes_test.go +++ b/pkg/test/utils/kubernetes_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1alpha1" + kudo "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1" "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/api/meta" diff --git a/test/e2e/cli-install-uninstall/00-assert.yaml b/test/e2e/cli-install-uninstall/00-assert.yaml index 46261a3c8..7b5331d6b 100644 --- a/test/e2e/cli-install-uninstall/00-assert.yaml +++ b/test/e2e/cli-install-uninstall/00-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: first-operator diff --git a/test/e2e/cli-install-uninstall/00-install.yaml b/test/e2e/cli-install-uninstall/00-install.yaml index 3e73dbc60..0f720179e 100644 --- a/test/e2e/cli-install-uninstall/00-install.yaml +++ b/test/e2e/cli-install-uninstall/00-install.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - kudo install --instance first-operator ./first-operator diff --git a/test/e2e/cli-install-uninstall/02-errors.yaml b/test/e2e/cli-install-uninstall/02-errors.yaml index 46261a3c8..7b5331d6b 100644 --- a/test/e2e/cli-install-uninstall/02-errors.yaml +++ b/test/e2e/cli-install-uninstall/02-errors.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: first-operator diff --git a/test/e2e/cli-install-uninstall/02-uninstall.yaml b/test/e2e/cli-install-uninstall/02-uninstall.yaml index 942dff9c9..abc2375ca 100644 --- a/test/e2e/cli-install-uninstall/02-uninstall.yaml +++ b/test/e2e/cli-install-uninstall/02-uninstall.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - kudo uninstall --instance first-operator diff --git a/test/integration/cli-install/00-assert.yaml b/test/integration/cli-install/00-assert.yaml index eab04bdc9..de4ac9f1c 100644 --- a/test/integration/cli-install/00-assert.yaml +++ b/test/integration/cli-install/00-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: labels: diff --git a/test/integration/cli-install/00-install.yaml b/test/integration/cli-install/00-install.yaml index 0cac620d6..6f3147923 100644 --- a/test/integration/cli-install/00-install.yaml +++ b/test/integration/cli-install/00-install.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - kudo install --instance cli-install ./cli-install-operator diff --git a/test/integration/cli-install/01-assert.yaml b/test/integration/cli-install/01-assert.yaml index eb60b65f1..6c1b225a4 100644 --- a/test/integration/cli-install/01-assert.yaml +++ b/test/integration/cli-install/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: labels: diff --git a/test/integration/cli-install/01-upgrade.yaml b/test/integration/cli-install/01-upgrade.yaml index 42f6a22f2..11e373a68 100644 --- a/test/integration/cli-install/01-upgrade.yaml +++ b/test/integration/cli-install/01-upgrade.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: cli-install diff --git a/test/integration/create-operator-in-operator/00-dream.yaml b/test/integration/create-operator-in-operator/00-dream.yaml index 01f96fbf1..4ebb3958d 100644 --- a/test/integration/create-operator-in-operator/00-dream.yaml +++ b/test/integration/create-operator-in-operator/00-dream.yaml @@ -1,12 +1,12 @@ ## operator-in-operator is the umbrella operator that tests the creation of instances within an operator -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Operator metadata: labels: controller-tools.k8s.io: "1.0" name: operator-in-operator --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: labels: @@ -20,7 +20,7 @@ spec: kind: Operator templates: operator.yaml: | - apiVersion: kudo.dev/v1alpha1 + apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: inner-instance diff --git a/test/integration/create-operator-in-operator/01-assert.yaml b/test/integration/create-operator-in-operator/01-assert.yaml index 8567c78fa..f5bfc201b 100644 --- a/test/integration/create-operator-in-operator/01-assert.yaml +++ b/test/integration/create-operator-in-operator/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: oio-instance @@ -6,7 +6,7 @@ status: aggregatedStatus: status: COMPLETE --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: inner-instance diff --git a/test/integration/create-operator-in-operator/01-install.yaml b/test/integration/create-operator-in-operator/01-install.yaml index 6d6f2c727..00f97fcfa 100644 --- a/test/integration/create-operator-in-operator/01-install.yaml +++ b/test/integration/create-operator-in-operator/01-install.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: labels: diff --git a/test/integration/first-operator-test/00-install.yaml b/test/integration/first-operator-test/00-install.yaml index 3e73dbc60..0f720179e 100644 --- a/test/integration/first-operator-test/00-install.yaml +++ b/test/integration/first-operator-test/00-install.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - kudo install --instance first-operator ./first-operator diff --git a/test/integration/first-operator-test/01-errors.yaml b/test/integration/first-operator-test/01-errors.yaml index 33e450bd8..420bad828 100644 --- a/test/integration/first-operator-test/01-errors.yaml +++ b/test/integration/first-operator-test/01-errors.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: first-operator diff --git a/test/integration/first-operator-test/01-scale.yaml b/test/integration/first-operator-test/01-scale.yaml index 50e4cd4da..db8f1c51b 100644 --- a/test/integration/first-operator-test/01-scale.yaml +++ b/test/integration/first-operator-test/01-scale.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: first-operator diff --git a/test/integration/immutable-client-ip/00-assert.yaml b/test/integration/immutable-client-ip/00-assert.yaml index 8eb4ee461..fc14718ac 100644 --- a/test/integration/immutable-client-ip/00-assert.yaml +++ b/test/integration/immutable-client-ip/00-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: immutable-client-ip-instance diff --git a/test/integration/immutable-client-ip/00-install-instance.yaml b/test/integration/immutable-client-ip/00-install-instance.yaml index 7d15464ed..0244f41b8 100644 --- a/test/integration/immutable-client-ip/00-install-instance.yaml +++ b/test/integration/immutable-client-ip/00-install-instance.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: immutable-client-ip-instance @@ -9,7 +9,7 @@ spec: name: service-operator kind: OperatorVersion --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: service-operator diff --git a/test/integration/immutable-client-ip/01-assert.yaml b/test/integration/immutable-client-ip/01-assert.yaml index 4928dee54..adaa5e8ec 100644 --- a/test/integration/immutable-client-ip/01-assert.yaml +++ b/test/integration/immutable-client-ip/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: immutable-client-ip-instance diff --git a/test/integration/immutable-client-ip/01-update_parameter.yaml b/test/integration/immutable-client-ip/01-update_parameter.yaml index a64656769..0e3d2c8c4 100644 --- a/test/integration/immutable-client-ip/01-update_parameter.yaml +++ b/test/integration/immutable-client-ip/01-update_parameter.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: immutable-client-ip-instance diff --git a/test/integration/install-existing-crds-in-operator/00-assert.yaml b/test/integration/install-existing-crds-in-operator/00-assert.yaml index 43db8974b..e78b87f40 100644 --- a/test/integration/install-existing-crds-in-operator/00-assert.yaml +++ b/test/integration/install-existing-crds-in-operator/00-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: crd-instance diff --git a/test/integration/install-existing-crds-in-operator/00-install-operator.yaml b/test/integration/install-existing-crds-in-operator/00-install-operator.yaml index 38bcee6a2..be1783ca0 100644 --- a/test/integration/install-existing-crds-in-operator/00-install-operator.yaml +++ b/test/integration/install-existing-crds-in-operator/00-install-operator.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - kudo install --instance crd-instance ./crd-operator diff --git a/test/integration/install-existing-crds-in-operator/crd-operator/templates/crd.yaml b/test/integration/install-existing-crds-in-operator/crd-operator/templates/crd.yaml index 93bd52902..684c87035 100644 --- a/test/integration/install-existing-crds-in-operator/crd-operator/templates/crd.yaml +++ b/test/integration/install-existing-crds-in-operator/crd-operator/templates/crd.yaml @@ -13,4 +13,4 @@ spec: plural: abcs singular: abc scope: Namespaced - version: v1alpha1 \ No newline at end of file + version: v1beta1 \ No newline at end of file diff --git a/test/integration/instance-controller-param-change-custom-trigger/00-assert.yaml b/test/integration/instance-controller-param-change-custom-trigger/00-assert.yaml index 68a617ac8..7ec1542f5 100644 --- a/test/integration/instance-controller-param-change-custom-trigger/00-assert.yaml +++ b/test/integration/instance-controller-param-change-custom-trigger/00-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-custom-trigger diff --git a/test/integration/instance-controller-param-change-custom-trigger/00-setup.yaml b/test/integration/instance-controller-param-change-custom-trigger/00-setup.yaml index 29307b6b4..48cfec3a3 100644 --- a/test/integration/instance-controller-param-change-custom-trigger/00-setup.yaml +++ b/test/integration/instance-controller-param-change-custom-trigger/00-setup.yaml @@ -2,7 +2,7 @@ # # The next step will update the parameter and verify that it triggers the # execution for the plan defined as a trigger. -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: icto-custom-trigger @@ -16,7 +16,7 @@ spec: update: foo-changed: --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-custom-trigger diff --git a/test/integration/instance-controller-param-change-custom-trigger/01-assert.yaml b/test/integration/instance-controller-param-change-custom-trigger/01-assert.yaml index 7c4b608c9..707fd6ae9 100644 --- a/test/integration/instance-controller-param-change-custom-trigger/01-assert.yaml +++ b/test/integration/instance-controller-param-change-custom-trigger/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-custom-trigger diff --git a/test/integration/instance-controller-param-change-custom-trigger/01-update-instance.yaml b/test/integration/instance-controller-param-change-custom-trigger/01-update-instance.yaml index c8ea54349..dd978a887 100644 --- a/test/integration/instance-controller-param-change-custom-trigger/01-update-instance.yaml +++ b/test/integration/instance-controller-param-change-custom-trigger/01-update-instance.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-custom-trigger diff --git a/test/integration/instance-controller-param-change-fallback-to-deploy/00-assert.yaml b/test/integration/instance-controller-param-change-fallback-to-deploy/00-assert.yaml index c5aff12f8..17ff91e3d 100644 --- a/test/integration/instance-controller-param-change-fallback-to-deploy/00-assert.yaml +++ b/test/integration/instance-controller-param-change-fallback-to-deploy/00-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-fallback-to-deploy diff --git a/test/integration/instance-controller-param-change-fallback-to-deploy/00-setup.yaml b/test/integration/instance-controller-param-change-fallback-to-deploy/00-setup.yaml index 1a56e18df..864cdbf2f 100644 --- a/test/integration/instance-controller-param-change-fallback-to-deploy/00-setup.yaml +++ b/test/integration/instance-controller-param-change-fallback-to-deploy/00-setup.yaml @@ -3,7 +3,7 @@ # # The next step will update the parameter and verify that it triggers the creation # of a `PlanExecution` for the `deploy` plan. -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: icto-fallback-to-deploy @@ -17,7 +17,7 @@ spec: plans: deploy: --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-fallback-to-deploy diff --git a/test/integration/instance-controller-param-change-fallback-to-deploy/01-assert.yaml b/test/integration/instance-controller-param-change-fallback-to-deploy/01-assert.yaml index 100121f72..56fc8caa1 100644 --- a/test/integration/instance-controller-param-change-fallback-to-deploy/01-assert.yaml +++ b/test/integration/instance-controller-param-change-fallback-to-deploy/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-fallback-to-deploy diff --git a/test/integration/instance-controller-param-change-fallback-to-deploy/01-update-instance.yaml b/test/integration/instance-controller-param-change-fallback-to-deploy/01-update-instance.yaml index 8f8631324..210b9d78d 100644 --- a/test/integration/instance-controller-param-change-fallback-to-deploy/01-update-instance.yaml +++ b/test/integration/instance-controller-param-change-fallback-to-deploy/01-update-instance.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-fallback-to-deploy diff --git a/test/integration/instance-controller-param-change-no-trigger/00-assert.yaml b/test/integration/instance-controller-param-change-no-trigger/00-assert.yaml index 1d776711a..4efea6672 100644 --- a/test/integration/instance-controller-param-change-no-trigger/00-assert.yaml +++ b/test/integration/instance-controller-param-change-no-trigger/00-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-no-trigger diff --git a/test/integration/instance-controller-param-change-no-trigger/00-setup.yaml b/test/integration/instance-controller-param-change-no-trigger/00-setup.yaml index b397bc9a5..a2c28a94a 100644 --- a/test/integration/instance-controller-param-change-no-trigger/00-setup.yaml +++ b/test/integration/instance-controller-param-change-no-trigger/00-setup.yaml @@ -3,7 +3,7 @@ # # The next step will update the parameter and verify that it triggers the creation # of a `PlanExecution` for the `update` plan. -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: icto-no-trigger @@ -15,7 +15,7 @@ spec: deploy: update: --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-no-trigger diff --git a/test/integration/instance-controller-param-change-no-trigger/01-assert.yaml b/test/integration/instance-controller-param-change-no-trigger/01-assert.yaml index b8ee797d8..ad519cf67 100644 --- a/test/integration/instance-controller-param-change-no-trigger/01-assert.yaml +++ b/test/integration/instance-controller-param-change-no-trigger/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-no-trigger diff --git a/test/integration/instance-controller-param-change-no-trigger/01-update-instance.yaml b/test/integration/instance-controller-param-change-no-trigger/01-update-instance.yaml index dbe8a0ad0..cad62b65f 100644 --- a/test/integration/instance-controller-param-change-no-trigger/01-update-instance.yaml +++ b/test/integration/instance-controller-param-change-no-trigger/01-update-instance.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-no-trigger diff --git a/test/integration/instance-controller-upgrade-fallback-to-deploy/00-assert.yaml b/test/integration/instance-controller-upgrade-fallback-to-deploy/00-assert.yaml index 75531516a..d69f1f2ee 100644 --- a/test/integration/instance-controller-upgrade-fallback-to-deploy/00-assert.yaml +++ b/test/integration/instance-controller-upgrade-fallback-to-deploy/00-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-upgrade-fallback-to-deploy diff --git a/test/integration/instance-controller-upgrade-fallback-to-deploy/00-setup.yaml b/test/integration/instance-controller-upgrade-fallback-to-deploy/00-setup.yaml index 9ae84ceeb..bdf9840b2 100644 --- a/test/integration/instance-controller-upgrade-fallback-to-deploy/00-setup.yaml +++ b/test/integration/instance-controller-upgrade-fallback-to-deploy/00-setup.yaml @@ -12,12 +12,12 @@ # 2. Create a new operator version with just a "deploy" plan. # 3. Trigger an upgrading by updating the operator version used by the instance. # 4. Verify that KUDO creates a new "deploy" plan execution. -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Operator metadata: name: icto-upgrade --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: icto-upgrade @@ -30,7 +30,7 @@ spec: deploy: upgrade: --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-upgrade-fallback-to-deploy diff --git a/test/integration/instance-controller-upgrade-fallback-to-deploy/01-assert.yaml b/test/integration/instance-controller-upgrade-fallback-to-deploy/01-assert.yaml index 75531516a..d69f1f2ee 100644 --- a/test/integration/instance-controller-upgrade-fallback-to-deploy/01-assert.yaml +++ b/test/integration/instance-controller-upgrade-fallback-to-deploy/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-upgrade-fallback-to-deploy diff --git a/test/integration/instance-controller-upgrade-fallback-to-deploy/01-upgrade-instance.yaml b/test/integration/instance-controller-upgrade-fallback-to-deploy/01-upgrade-instance.yaml index 751b646fb..504cbc676 100644 --- a/test/integration/instance-controller-upgrade-fallback-to-deploy/01-upgrade-instance.yaml +++ b/test/integration/instance-controller-upgrade-fallback-to-deploy/01-upgrade-instance.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: icto-upgrade-fallback-to-deploy @@ -10,7 +10,7 @@ spec: plans: deploy: --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-upgrade-fallback-to-deploy diff --git a/test/integration/instance-controller-upgrade-fallback-to-update/00-assert.yaml b/test/integration/instance-controller-upgrade-fallback-to-update/00-assert.yaml index 245b3873b..90d906ae1 100644 --- a/test/integration/instance-controller-upgrade-fallback-to-update/00-assert.yaml +++ b/test/integration/instance-controller-upgrade-fallback-to-update/00-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-upgrade-fallback-to-update diff --git a/test/integration/instance-controller-upgrade-fallback-to-update/00-setup.yaml b/test/integration/instance-controller-upgrade-fallback-to-update/00-setup.yaml index 8e7a56334..ead67aff9 100644 --- a/test/integration/instance-controller-upgrade-fallback-to-update/00-setup.yaml +++ b/test/integration/instance-controller-upgrade-fallback-to-update/00-setup.yaml @@ -8,12 +8,12 @@ # The next step will then create new OperatorVersion which will include # "update" and "deploy" plans, update the instance, and finally verify that the # right PlanExecution was created. -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Operator metadata: name: icto-upgrade --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: icto-upgrade @@ -27,7 +27,7 @@ spec: upgrade: update: --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-upgrade-fallback-to-update diff --git a/test/integration/instance-controller-upgrade-fallback-to-update/01-assert.yaml b/test/integration/instance-controller-upgrade-fallback-to-update/01-assert.yaml index a7583eb8f..7d6e1d106 100644 --- a/test/integration/instance-controller-upgrade-fallback-to-update/01-assert.yaml +++ b/test/integration/instance-controller-upgrade-fallback-to-update/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-upgrade-fallback-to-update diff --git a/test/integration/instance-controller-upgrade-fallback-to-update/01-upgrade-instance.yaml b/test/integration/instance-controller-upgrade-fallback-to-update/01-upgrade-instance.yaml index 5e57d6b47..42a4092cc 100644 --- a/test/integration/instance-controller-upgrade-fallback-to-update/01-upgrade-instance.yaml +++ b/test/integration/instance-controller-upgrade-fallback-to-update/01-upgrade-instance.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: icto-upgrade-fallback-to-update @@ -11,7 +11,7 @@ spec: deploy: update: --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-upgrade-fallback-to-update diff --git a/test/integration/instance-controller-upgrade/00-assert.yaml b/test/integration/instance-controller-upgrade/00-assert.yaml index 8f91d4a50..12842c352 100644 --- a/test/integration/instance-controller-upgrade/00-assert.yaml +++ b/test/integration/instance-controller-upgrade/00-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-upgrade diff --git a/test/integration/instance-controller-upgrade/00-setup.yaml b/test/integration/instance-controller-upgrade/00-setup.yaml index c653e9b18..74308e449 100644 --- a/test/integration/instance-controller-upgrade/00-setup.yaml +++ b/test/integration/instance-controller-upgrade/00-setup.yaml @@ -7,12 +7,12 @@ # The next step will then create new OperatorVersion which will include an # "upgrade" plan, update the instance, and finally verify that the right # plan executed. -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Operator metadata: name: icto-upgrade --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: icto-upgrade @@ -25,7 +25,7 @@ spec: deploy: upgrade: --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-upgrade diff --git a/test/integration/instance-controller-upgrade/01-assert.yaml b/test/integration/instance-controller-upgrade/01-assert.yaml index 5066a4d69..dd60ee404 100644 --- a/test/integration/instance-controller-upgrade/01-assert.yaml +++ b/test/integration/instance-controller-upgrade/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-upgrade diff --git a/test/integration/instance-controller-upgrade/01-upgrade-instance.yaml b/test/integration/instance-controller-upgrade/01-upgrade-instance.yaml index 97879fbba..57d7ae48d 100644 --- a/test/integration/instance-controller-upgrade/01-upgrade-instance.yaml +++ b/test/integration/instance-controller-upgrade/01-upgrade-instance.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: icto-upgrade-v2 @@ -12,7 +12,7 @@ spec: update: upgrade: --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: icto-upgrade diff --git a/test/integration/operator-test/00-install.yaml b/test/integration/operator-test/00-install.yaml index 82ae9a66c..42bd97eee 100644 --- a/test/integration/operator-test/00-install.yaml +++ b/test/integration/operator-test/00-install.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: operator-test-instance diff --git a/test/integration/operator-test/01-upgrade.yaml b/test/integration/operator-test/01-upgrade.yaml index 8a7e3ef42..4f2cf02f4 100644 --- a/test/integration/operator-test/01-upgrade.yaml +++ b/test/integration/operator-test/01-upgrade.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: operator-test-instance diff --git a/test/integration/operator-with-custom-crd/01-assert.yaml b/test/integration/operator-with-custom-crd/01-assert.yaml index ddf43285e..3f2f1397d 100644 --- a/test/integration/operator-with-custom-crd/01-assert.yaml +++ b/test/integration/operator-with-custom-crd/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: crd-instance diff --git a/test/integration/operator-with-custom-crd/01-install.yaml b/test/integration/operator-with-custom-crd/01-install.yaml index 3d0a79636..ae4a34571 100644 --- a/test/integration/operator-with-custom-crd/01-install.yaml +++ b/test/integration/operator-with-custom-crd/01-install.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - kudo install --instance crd-instance ./operator diff --git a/test/integration/parse-param-operator-in-operator/00-dream.yaml b/test/integration/parse-param-operator-in-operator/00-dream.yaml index c0fd7ac42..4aa21179b 100644 --- a/test/integration/parse-param-operator-in-operator/00-dream.yaml +++ b/test/integration/parse-param-operator-in-operator/00-dream.yaml @@ -1,12 +1,12 @@ ## Dream is the umbrella operator that tests the creation of instances within an operator -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Operator metadata: labels: controller-tools.k8s.io: "1.0" name: dream --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: labels: @@ -20,7 +20,7 @@ spec: kind: Operator templates: operator.yaml: | - apiVersion: kudo.dev/v1alpha1 + apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: operator diff --git a/test/integration/parse-param-operator-in-operator/01-assert.yaml b/test/integration/parse-param-operator-in-operator/01-assert.yaml index 7c66d90b1..0d9e69818 100644 --- a/test/integration/parse-param-operator-in-operator/01-assert.yaml +++ b/test/integration/parse-param-operator-in-operator/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: dream1 @@ -6,7 +6,7 @@ status: aggregatedStatus: status: IN_PROGRESS --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: dream1 diff --git a/test/integration/parse-param-operator-in-operator/01-install.yaml b/test/integration/parse-param-operator-in-operator/01-install.yaml index e84b377cc..01226963a 100644 --- a/test/integration/parse-param-operator-in-operator/01-install.yaml +++ b/test/integration/parse-param-operator-in-operator/01-install.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: labels: diff --git a/test/integration/racy-reconcile/00-install-instance.yaml b/test/integration/racy-reconcile/00-install-instance.yaml index 6f8b71faf..ea1767eaa 100644 --- a/test/integration/racy-reconcile/00-install-instance.yaml +++ b/test/integration/racy-reconcile/00-install-instance.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: racy-instance diff --git a/test/integration/racy-reconcile/01-assert.yaml b/test/integration/racy-reconcile/01-assert.yaml index 7130b9416..2f1488ea0 100644 --- a/test/integration/racy-reconcile/01-assert.yaml +++ b/test/integration/racy-reconcile/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: racy-instance diff --git a/test/integration/racy-reconcile/01-install-operatorversion.yaml b/test/integration/racy-reconcile/01-install-operatorversion.yaml index 1987a5114..d8ab30a13 100644 --- a/test/integration/racy-reconcile/01-install-operatorversion.yaml +++ b/test/integration/racy-reconcile/01-install-operatorversion.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: racy-operator diff --git a/test/integration/rendering-error-plan-failed/00-assert.yaml b/test/integration/rendering-error-plan-failed/00-assert.yaml index 52007ba4c..1bf3e97d4 100644 --- a/test/integration/rendering-error-plan-failed/00-assert.yaml +++ b/test/integration/rendering-error-plan-failed/00-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: invalid1 diff --git a/test/integration/rendering-error-plan-failed/00-install.yaml b/test/integration/rendering-error-plan-failed/00-install.yaml index 18dd52dfb..767190bf5 100644 --- a/test/integration/rendering-error-plan-failed/00-install.yaml +++ b/test/integration/rendering-error-plan-failed/00-install.yaml @@ -1,11 +1,11 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Operator metadata: labels: controller-tools.k8s.io: "1.0" name: invalid --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: labels: @@ -59,7 +59,7 @@ spec: tasks: - invalid-task --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: labels: diff --git a/test/integration/step-delete/00-assert.yaml b/test/integration/step-delete/00-assert.yaml index 800a5bf63..11ddf6eda 100644 --- a/test/integration/step-delete/00-assert.yaml +++ b/test/integration/step-delete/00-assert.yaml @@ -1,5 +1,5 @@ # We only check the Instance here as the Job is deleted at the end of the step, so we cannot check for its existence. -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: step-delete-instance diff --git a/test/integration/step-delete/00-install-instance.yaml b/test/integration/step-delete/00-install-instance.yaml index 6a0cdfb02..8cfc78833 100644 --- a/test/integration/step-delete/00-install-instance.yaml +++ b/test/integration/step-delete/00-install-instance.yaml @@ -1,7 +1,7 @@ # This test validates that the plan execution controller properly deletes resources when a step has delete=true. # We validate this by setting a label in the Job's Pod spec via a parameter - Job Pod specs are immutable, so the second # step cannot pass if the Job was not deleted by KUDO. -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: job-operator @@ -42,7 +42,7 @@ spec: - name: test image: alpine --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: step-delete-instance diff --git a/test/integration/step-delete/01-assert.yaml b/test/integration/step-delete/01-assert.yaml index 800a5bf63..11ddf6eda 100644 --- a/test/integration/step-delete/01-assert.yaml +++ b/test/integration/step-delete/01-assert.yaml @@ -1,5 +1,5 @@ # We only check the Instance here as the Job is deleted at the end of the step, so we cannot check for its existence. -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: step-delete-instance diff --git a/test/integration/step-delete/01-upgrade.yaml b/test/integration/step-delete/01-upgrade.yaml index ebb7ddba7..fbb753818 100644 --- a/test/integration/step-delete/01-upgrade.yaml +++ b/test/integration/step-delete/01-upgrade.yaml @@ -1,5 +1,5 @@ # Set the hello label on the instance Job so that we verify that it was deleted (it is immutable). -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: step-delete-instance diff --git a/test/integration/update-command/00-install.yaml b/test/integration/update-command/00-install.yaml index efb206a23..ffe3f8214 100644 --- a/test/integration/update-command/00-install.yaml +++ b/test/integration/update-command/00-install.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: update-command-instance diff --git a/test/integration/update-command/01-assert.yaml b/test/integration/update-command/01-assert.yaml index f318cd854..637657775 100644 --- a/test/integration/update-command/01-assert.yaml +++ b/test/integration/update-command/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: update-command-instance diff --git a/test/integration/update-command/01-update.yaml b/test/integration/update-command/01-update.yaml index 39ad9090a..f27819077 100644 --- a/test/integration/update-command/01-update.yaml +++ b/test/integration/update-command/01-update.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - kudo update --instance update-command-instance -p "param=value" diff --git a/test/integration/update-command/02-add-new-param.yaml b/test/integration/update-command/02-add-new-param.yaml index 0704a8cc0..b744399ad 100644 --- a/test/integration/update-command/02-add-new-param.yaml +++ b/test/integration/update-command/02-add-new-param.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - kudo update --instance update-command-instance -p "param2=value2" diff --git a/test/integration/update-command/02-assert.yaml b/test/integration/update-command/02-assert.yaml index ca729e99d..d108d17da 100644 --- a/test/integration/update-command/02-assert.yaml +++ b/test/integration/update-command/02-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: update-command-instance diff --git a/test/integration/update-command/03-assert.yaml b/test/integration/update-command/03-assert.yaml index 70a7e9fa5..34075f66b 100644 --- a/test/integration/update-command/03-assert.yaml +++ b/test/integration/update-command/03-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: update-command-instance diff --git a/test/integration/update-command/03-update-param-value.yaml b/test/integration/update-command/03-update-param-value.yaml index 6388ce6cb..cdc135166 100644 --- a/test/integration/update-command/03-update-param-value.yaml +++ b/test/integration/update-command/03-update-param-value.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - kudo update --instance update-command-instance -p "param2=othervalue" diff --git a/test/integration/update-parameters/00-assert.yaml b/test/integration/update-parameters/00-assert.yaml index 23a692480..9901da350 100644 --- a/test/integration/update-parameters/00-assert.yaml +++ b/test/integration/update-parameters/00-assert.yaml @@ -7,7 +7,7 @@ spec: replicas: "1" param: "30" --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: toy1 diff --git a/test/integration/update-parameters/00-install.yaml b/test/integration/update-parameters/00-install.yaml index 8d769d496..ba8937d93 100644 --- a/test/integration/update-parameters/00-install.yaml +++ b/test/integration/update-parameters/00-install.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: labels: diff --git a/test/integration/update-parameters/01-assert.yaml b/test/integration/update-parameters/01-assert.yaml index 67f2d6926..d5bfd17f9 100644 --- a/test/integration/update-parameters/01-assert.yaml +++ b/test/integration/update-parameters/01-assert.yaml @@ -7,7 +7,7 @@ spec: replicas: "3" param: "30" --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: toy1 diff --git a/test/integration/update-parameters/01-update-replicas-and-scale.yaml b/test/integration/update-parameters/01-update-replicas-and-scale.yaml index dc32f9175..c5d086baf 100644 --- a/test/integration/update-parameters/01-update-replicas-and-scale.yaml +++ b/test/integration/update-parameters/01-update-replicas-and-scale.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: labels: diff --git a/test/integration/update-parameters/02-assert.yaml b/test/integration/update-parameters/02-assert.yaml index f5fb2a6cf..c65e27f71 100644 --- a/test/integration/update-parameters/02-assert.yaml +++ b/test/integration/update-parameters/02-assert.yaml @@ -6,7 +6,7 @@ spec: selector: param: "after" --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: toy1 diff --git a/test/integration/update-parameters/02-param-update.yaml b/test/integration/update-parameters/02-param-update.yaml index e838fc337..9c072eb10 100644 --- a/test/integration/update-parameters/02-param-update.yaml +++ b/test/integration/update-parameters/02-param-update.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: labels: diff --git a/test/integration/upgrade-command/00-assert.yaml b/test/integration/upgrade-command/00-assert.yaml index 572c4e666..f20b62711 100644 --- a/test/integration/upgrade-command/00-assert.yaml +++ b/test/integration/upgrade-command/00-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: upgrade-instance diff --git a/test/integration/upgrade-command/00-install.yaml b/test/integration/upgrade-command/00-install.yaml index a5adc2943..a6d1517fb 100644 --- a/test/integration/upgrade-command/00-install.yaml +++ b/test/integration/upgrade-command/00-install.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - kudo install --instance upgrade-instance ./first-operator diff --git a/test/integration/upgrade-command/01-assert.yaml b/test/integration/upgrade-command/01-assert.yaml index 7144149db..654c089a8 100644 --- a/test/integration/upgrade-command/01-assert.yaml +++ b/test/integration/upgrade-command/01-assert.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Instance metadata: name: upgrade-instance diff --git a/test/integration/upgrade-command/01-upgrade.yaml b/test/integration/upgrade-command/01-upgrade.yaml index 57c8c3c34..a64e1d92a 100644 --- a/test/integration/upgrade-command/01-upgrade.yaml +++ b/test/integration/upgrade-command/01-upgrade.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: TestStep kubectl: - kudo upgrade --instance upgrade-instance ./second-operator -p version=1.7.10 diff --git a/test/manifests/test-operator.yaml b/test/manifests/test-operator.yaml index 3a0151167..eada07261 100644 --- a/test/manifests/test-operator.yaml +++ b/test/manifests/test-operator.yaml @@ -1,4 +1,4 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Operator metadata: name: test-operator @@ -8,7 +8,7 @@ spec: - name: KUDO email: kudobuilder@gmail.com --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: name: test-operator-1.0 diff --git a/test/manifests/toy.yaml b/test/manifests/toy.yaml index ce565a117..0ec355725 100644 --- a/test/manifests/toy.yaml +++ b/test/manifests/toy.yaml @@ -1,11 +1,11 @@ -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: Operator metadata: labels: controller-tools.k8s.io: "1.0" name: toy --- -apiVersion: kudo.dev/v1alpha1 +apiVersion: kudo.dev/v1beta1 kind: OperatorVersion metadata: labels: