From 51dd003ce79f5d0ca5f4681b72f01994c9ed04e4 Mon Sep 17 00:00:00 2001 From: Mikhail Fedosin Date: Fri, 25 Aug 2023 21:33:27 +0200 Subject: [PATCH] Update e2e tests --- test/e2e/helm_test.go | 72 +++++++++---------- .../all-providers-custom-ns-versions.yaml | 28 ++++---- .../all-providers-custom-versions.yaml | 28 ++++---- .../all-providers-latest-versions.yaml | 28 ++++---- ...multiple-bootstrap-custom-ns-versions.yaml | 21 +++--- ...iple-control-plane-custom-ns-versions.yaml | 21 +++--- .../multiple-infra-custom-ns-versions.yaml | 35 +++++---- test/e2e/resources/only-bootstrap.yaml | 14 ++-- test/e2e/resources/only-control-plane.yaml | 14 ++-- test/e2e/resources/only-infra.yaml | 28 ++++---- 10 files changed, 160 insertions(+), 129 deletions(-) diff --git a/test/e2e/helm_test.go b/test/e2e/helm_test.go index 9acb70250..013f2388a 100644 --- a/test/e2e/helm_test.go +++ b/test/e2e/helm_test.go @@ -53,12 +53,12 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func It("should deploy all providers with custom namespace and versions", func() { manifests, err := helmChart.Run(map[string]string{ - "secretName": "test-secret-name", - "secretNamespace": "test-secret-namespace", - "core": "capi-custom-ns:cluster-api:v1.4.2", - "controlPlane": "kubeadm-control-plane-custom-ns:kubeadm:v1.4.2", - "bootstrap": "kubeadm-bootstrap-custom-ns:kubeadm:v1.4.2", - "infrastructure": "capd-custom-ns:docker:v1.4.2", + "configSecret.name": "test-secret-name", + "configSecret.namespace": "test-secret-namespace", + "core": "capi-custom-ns:cluster-api:v1.4.2", + "controlPlane": "kubeadm-control-plane-custom-ns:kubeadm:v1.4.2", + "bootstrap": "kubeadm-bootstrap-custom-ns:kubeadm:v1.4.2", + "infrastructure": "capd-custom-ns:docker:v1.4.2", }) Expect(err).ToNot(HaveOccurred()) Expect(manifests).ToNot(BeEmpty()) @@ -69,12 +69,12 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func It("should deploy all providers with custom versions", func() { manifests, err := helmChart.Run(map[string]string{ - "secretName": "test-secret-name", - "secretNamespace": "test-secret-namespace", - "core": "cluster-api:v1.4.2", - "controlPlane": "kubeadm:v1.4.2", - "bootstrap": "kubeadm:v1.4.2", - "infrastructure": "docker:v1.4.2", + "configSecret.name": "test-secret-name", + "configSecret.namespace": "test-secret-namespace", + "core": "cluster-api:v1.4.2", + "controlPlane": "kubeadm:v1.4.2", + "bootstrap": "kubeadm:v1.4.2", + "infrastructure": "docker:v1.4.2", }) Expect(err).ToNot(HaveOccurred()) Expect(manifests).ToNot(BeEmpty()) @@ -85,12 +85,12 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func It("should deploy all providers with latest version", func() { manifests, err := helmChart.Run(map[string]string{ - "secretName": "test-secret-name", - "secretNamespace": "test-secret-namespace", - "core": "cluster-api", - "controlPlane": "kubeadm", - "bootstrap": "kubeadm", - "infrastructure": "docker", + "configSecret.name": "test-secret-name", + "configSecret.namespace": "test-secret-namespace", + "core": "cluster-api", + "controlPlane": "kubeadm", + "bootstrap": "kubeadm", + "infrastructure": "docker", }) Expect(err).ToNot(HaveOccurred()) Expect(manifests).ToNot(BeEmpty()) @@ -101,9 +101,9 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func It("should deploy core, bootstrap, control plane when only infra is specified", func() { manifests, err := helmChart.Run(map[string]string{ - "secretName": "test-secret-name", - "secretNamespace": "test-secret-namespace", - "infrastructure": "docker", + "configSecret.name": "test-secret-name", + "configSecret.namespace": "test-secret-namespace", + "infrastructure": "docker", }) Expect(err).ToNot(HaveOccurred()) Expect(manifests).ToNot(BeEmpty()) @@ -114,9 +114,9 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func It("should deploy core when only bootstrap is specified", func() { manifests, err := helmChart.Run(map[string]string{ - "secretName": "test-secret-name", - "secretNamespace": "test-secret-namespace", - "bootstrap": "kubeadm", + "configSecret.name": "test-secret-name", + "configSecret.namespace": "test-secret-namespace", + "bootstrap": "kubeadm", }) Expect(err).ToNot(HaveOccurred()) Expect(manifests).ToNot(BeEmpty()) @@ -127,9 +127,9 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func It("should deploy core when only control plane is specified", func() { manifests, err := helmChart.Run(map[string]string{ - "secretName": "test-secret-name", - "secretNamespace": "test-secret-namespace", - "controlPlane": "kubeadm", + "configSecret.name": "test-secret-name", + "configSecret.namespace": "test-secret-namespace", + "controlPlane": "kubeadm", }) Expect(err).ToNot(HaveOccurred()) Expect(manifests).ToNot(BeEmpty()) @@ -140,9 +140,9 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func It("should deploy multiple infra providers with custom namespace and versions", func() { manifests, err := helmChart.Run(map[string]string{ - "secretName": "test-secret-name", - "secretNamespace": "test-secret-namespace", - "infrastructure": "capd-custom-ns:docker:v1.4.2;capz-custom-ns:azure:v1.10.0", + "configSecret.name": "test-secret-name", + "configSecret.namespace": "test-secret-namespace", + "infrastructure": "capd-custom-ns:docker:v1.4.2;capz-custom-ns:azure:v1.10.0", }) Expect(err).ToNot(HaveOccurred()) Expect(manifests).ToNot(BeEmpty()) @@ -153,9 +153,9 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func It("should deploy multiple control plane providers with custom namespace and versions", func() { manifests, err := helmChart.Run(map[string]string{ - "secretName": "test-secret-name", - "secretNamespace": "test-secret-namespace", - "controlPlane": "kubeadm-control-plane-custom-ns:kubeadm:v1.4.2;rke2-control-plane-custom-ns:rke2:v0.3.0", + "configSecret.name": "test-secret-name", + "configSecret.namespace": "test-secret-namespace", + "controlPlane": "kubeadm-control-plane-custom-ns:kubeadm:v1.4.2;rke2-control-plane-custom-ns:rke2:v0.3.0", }) Expect(err).ToNot(HaveOccurred()) Expect(manifests).ToNot(BeEmpty()) @@ -166,9 +166,9 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func It("should deploy multiple bootstrap providers with custom namespace and versions", func() { manifests, err := helmChart.Run(map[string]string{ - "secretName": "test-secret-name", - "secretNamespace": "test-secret-namespace", - "bootstrap": "kubeadm-bootstrap-custom-ns:kubeadm:v1.4.2;rke2-bootstrap-custom-ns:rke2:v0.3.0", + "configSecret.name": "test-secret-name", + "configSecret.namespace": "test-secret-namespace", + "bootstrap": "kubeadm-bootstrap-custom-ns:kubeadm:v1.4.2;rke2-bootstrap-custom-ns:rke2:v0.3.0", }) Expect(err).ToNot(HaveOccurred()) Expect(manifests).ToNot(BeEmpty()) diff --git a/test/e2e/resources/all-providers-custom-ns-versions.yaml b/test/e2e/resources/all-providers-custom-ns-versions.yaml index fc2704940..c1e1a7083 100644 --- a/test/e2e/resources/all-providers-custom-ns-versions.yaml +++ b/test/e2e/resources/all-providers-custom-ns-versions.yaml @@ -36,7 +36,7 @@ metadata: name: capd-custom-ns --- # Source: cluster-api-operator/templates/bootstrap.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: name: kubeadm @@ -46,11 +46,12 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v1.4.2 - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/control-plane.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: name: kubeadm @@ -60,11 +61,12 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v1.4.2 - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/core.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: name: cluster-api @@ -74,11 +76,12 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v1.4.2 - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/infra.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: name: docker @@ -88,5 +91,6 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v1.4.2 - secretName: test-secret-name - secretNamespace: test-secret-namespace \ No newline at end of file + configSecret: + name: test-secret-name + namespace: test-secret-namespace diff --git a/test/e2e/resources/all-providers-custom-versions.yaml b/test/e2e/resources/all-providers-custom-versions.yaml index fa4110747..dbbae46ac 100644 --- a/test/e2e/resources/all-providers-custom-versions.yaml +++ b/test/e2e/resources/all-providers-custom-versions.yaml @@ -36,7 +36,7 @@ metadata: name: docker-infrastructure-system --- # Source: cluster-api-operator/templates/bootstrap.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: name: kubeadm @@ -46,11 +46,12 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v1.4.2 - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/control-plane.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: name: kubeadm @@ -60,11 +61,12 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v1.4.2 - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/core.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: name: cluster-api @@ -74,11 +76,12 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v1.4.2 - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/infra.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: name: docker @@ -88,5 +91,6 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v1.4.2 - secretName: test-secret-name - secretNamespace: test-secret-namespace \ No newline at end of file + configSecret: + name: test-secret-name + namespace: test-secret-namespace diff --git a/test/e2e/resources/all-providers-latest-versions.yaml b/test/e2e/resources/all-providers-latest-versions.yaml index a8da52014..d93e72dcf 100644 --- a/test/e2e/resources/all-providers-latest-versions.yaml +++ b/test/e2e/resources/all-providers-latest-versions.yaml @@ -36,7 +36,7 @@ metadata: name: docker-infrastructure-system --- # Source: cluster-api-operator/templates/bootstrap.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: name: kubeadm @@ -45,11 +45,12 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/control-plane.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: name: kubeadm @@ -58,11 +59,12 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/core.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: name: cluster-api @@ -71,11 +73,12 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/infra.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: name: docker @@ -84,5 +87,6 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace \ No newline at end of file + configSecret: + name: test-secret-name + namespace: test-secret-namespace diff --git a/test/e2e/resources/multiple-bootstrap-custom-ns-versions.yaml b/test/e2e/resources/multiple-bootstrap-custom-ns-versions.yaml index e7a6b97e2..46df4e245 100644 --- a/test/e2e/resources/multiple-bootstrap-custom-ns-versions.yaml +++ b/test/e2e/resources/multiple-bootstrap-custom-ns-versions.yaml @@ -27,7 +27,7 @@ metadata: name: rke2-bootstrap-custom-ns --- # Source: cluster-api-operator/templates/bootstrap.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: name: kubeadm @@ -37,11 +37,12 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v1.4.2 - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/bootstrap.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: name: rke2 @@ -51,11 +52,12 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v0.3.0 - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/bootstrap-conditions.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: name: cluster-api @@ -64,5 +66,6 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace \ No newline at end of file + configSecret: + name: test-secret-name + namespace: test-secret-namespace diff --git a/test/e2e/resources/multiple-control-plane-custom-ns-versions.yaml b/test/e2e/resources/multiple-control-plane-custom-ns-versions.yaml index d95780e3a..19d1a8655 100644 --- a/test/e2e/resources/multiple-control-plane-custom-ns-versions.yaml +++ b/test/e2e/resources/multiple-control-plane-custom-ns-versions.yaml @@ -27,7 +27,7 @@ metadata: name: rke2-control-plane-custom-ns --- # Source: cluster-api-operator/templates/control-plane.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: name: kubeadm @@ -37,11 +37,12 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v1.4.2 - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/control-plane.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: name: rke2 @@ -51,11 +52,12 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v0.3.0 - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/control-plane-conditions.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: name: cluster-api @@ -64,5 +66,6 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace \ No newline at end of file + configSecret: + name: test-secret-name + namespace: test-secret-namespace diff --git a/test/e2e/resources/multiple-infra-custom-ns-versions.yaml b/test/e2e/resources/multiple-infra-custom-ns-versions.yaml index a87e79583..128e8d9b0 100644 --- a/test/e2e/resources/multiple-infra-custom-ns-versions.yaml +++ b/test/e2e/resources/multiple-infra-custom-ns-versions.yaml @@ -45,7 +45,7 @@ metadata: name: capz-custom-ns --- # Source: cluster-api-operator/templates/infra-conditions.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: name: kubeadm @@ -54,11 +54,12 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/infra-conditions.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: name: kubeadm @@ -67,11 +68,12 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/infra-conditions.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: name: cluster-api @@ -80,11 +82,12 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/infra.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: name: docker @@ -94,11 +97,12 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v1.4.2 - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/infra.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: name: azure @@ -108,5 +112,6 @@ metadata: "helm.sh/hook-weight": "2" spec: version: v1.10.0 - secretName: test-secret-name - secretNamespace: test-secret-namespace \ No newline at end of file + configSecret: + name: test-secret-name + namespace: test-secret-namespace diff --git a/test/e2e/resources/only-bootstrap.yaml b/test/e2e/resources/only-bootstrap.yaml index 6eeaaa36d..e4f5f0c75 100644 --- a/test/e2e/resources/only-bootstrap.yaml +++ b/test/e2e/resources/only-bootstrap.yaml @@ -18,7 +18,7 @@ metadata: name: kubeadm-bootstrap-system --- # Source: cluster-api-operator/templates/bootstrap.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: name: kubeadm @@ -27,11 +27,12 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/bootstrap-conditions.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: name: cluster-api @@ -40,5 +41,6 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace \ No newline at end of file + configSecret: + name: test-secret-name + namespace: test-secret-namespace diff --git a/test/e2e/resources/only-control-plane.yaml b/test/e2e/resources/only-control-plane.yaml index 3f7e6d05d..a1cb80c39 100644 --- a/test/e2e/resources/only-control-plane.yaml +++ b/test/e2e/resources/only-control-plane.yaml @@ -18,7 +18,7 @@ metadata: name: kubeadm-control-plane-system --- # Source: cluster-api-operator/templates/control-plane.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: name: kubeadm @@ -27,11 +27,12 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/control-plane-conditions.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: name: cluster-api @@ -40,5 +41,6 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace \ No newline at end of file + configSecret: + name: test-secret-name + namespace: test-secret-namespace diff --git a/test/e2e/resources/only-infra.yaml b/test/e2e/resources/only-infra.yaml index 23b1121ee..f5c5dacd9 100644 --- a/test/e2e/resources/only-infra.yaml +++ b/test/e2e/resources/only-infra.yaml @@ -36,7 +36,7 @@ metadata: name: docker-infrastructure-system --- # Source: cluster-api-operator/templates/infra-conditions.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: BootstrapProvider metadata: name: kubeadm @@ -45,11 +45,12 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/infra-conditions.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: ControlPlaneProvider metadata: name: kubeadm @@ -58,11 +59,12 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/infra-conditions.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: CoreProvider metadata: name: cluster-api @@ -71,11 +73,12 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace + configSecret: + name: test-secret-name + namespace: test-secret-namespace --- # Source: cluster-api-operator/templates/infra.yaml -apiVersion: operator.cluster.x-k8s.io/v1alpha1 +apiVersion: operator.cluster.x-k8s.io/v1alpha2 kind: InfrastructureProvider metadata: name: docker @@ -84,5 +87,6 @@ metadata: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" spec: - secretName: test-secret-name - secretNamespace: test-secret-namespace \ No newline at end of file + configSecret: + name: test-secret-name + namespace: test-secret-namespace