Skip to content

Commit

Permalink
Bump CAPI versions (min=v1.7.7, max=v1.8.0) in E2E
Browse files Browse the repository at this point in the history
Signed-off-by: Furkat Gofurov <[email protected]>
  • Loading branch information
furkatgofurov7 committed Nov 11, 2024
1 parent 2807b27 commit 3b6be2b
Show file tree
Hide file tree
Showing 17 changed files with 27,112 additions and 21,694 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ CONTROLLER_IMG_TAG ?= $(CONTROLLER_IMG)-$(ARCH):$(TAG)
LDFLAGS := $(shell $(ROOT)/hack/version.sh)

# Default cert-manager version
CERT_MANAGER_VERSION ?= v1.14.5
CERT_MANAGER_VERSION ?= v1.15.1

# E2E configuration
GINKGO_NOCOLOR ?= false
Expand Down
14 changes: 7 additions & 7 deletions cmd/plugin/cmd/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,22 +171,22 @@ func TestInitProviders(t *testing.T) {
{
name: "core provider",
wantedProviders: []genericprovider.GenericProvider{
generateGenericProvider(clusterctlv1.CoreProviderType, "cluster-api", "capi-system", "v1.6.0", "", ""),
generateGenericProvider(clusterctlv1.CoreProviderType, "cluster-api", "capi-system", "v1.8.0", "", ""),
},
wantErr: false,
opts: &initOptions{
coreProvider: "cluster-api:capi-system:v1.6.0",
coreProvider: "cluster-api:capi-system:v1.8.0",
targetNamespace: "capi-operator-system",
},
},
{
name: "core provider in default target namespace",
wantedProviders: []genericprovider.GenericProvider{
generateGenericProvider(clusterctlv1.CoreProviderType, "cluster-api", "capi-operator-system", "v1.6.0", "", ""),
generateGenericProvider(clusterctlv1.CoreProviderType, "cluster-api", "capi-operator-system", "v1.8.0", "", ""),
},
wantErr: false,
opts: &initOptions{
coreProvider: "cluster-api::v1.6.0",
coreProvider: "cluster-api::v1.8.0",
targetNamespace: "capi-operator-system",
},
},
Expand Down Expand Up @@ -254,7 +254,7 @@ func TestInitProviders(t *testing.T) {
{
name: "all providers",
wantedProviders: []genericprovider.GenericProvider{
generateGenericProvider(clusterctlv1.CoreProviderType, "cluster-api", "capi-system", "v1.6.0", "", ""),
generateGenericProvider(clusterctlv1.CoreProviderType, "cluster-api", "capi-system", "v1.8.0", "", ""),
generateGenericProvider(clusterctlv1.InfrastructureProviderType, "aws", "capa-operator-system", "", "", ""),
generateGenericProvider(clusterctlv1.InfrastructureProviderType, "docker", "capd-operator-system", "", "", ""),
generateGenericProvider(clusterctlv1.ControlPlaneProviderType, "kubeadm", "kcp-system", "", "", ""),
Expand All @@ -263,9 +263,9 @@ func TestInitProviders(t *testing.T) {
},
wantErr: false,
opts: &initOptions{
coreProvider: "cluster-api:capi-system:v1.6.0",
coreProvider: "cluster-api:capi-system:v1.8.0",
infrastructureProviders: []string{
"cluster-api:capi-system:v1.6.0",
"cluster-api:capi-system:v1.8.0",
"aws:capa-operator-system",
"docker:capd-operator-system",
},
Expand Down
12 changes: 6 additions & 6 deletions cmd/plugin/cmd/upgrade_plan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ func TestUpgradePlan(t *testing.T) {
Name: "cluster-api",
Namespace: "capi-system",
Type: "core",
CurrentVersion: "v1.6.0",
CurrentVersion: "v1.8.0",
Source: "https://github.com/kubernetes-sigs/cluster-api/releases/latest/core-components.yaml",
SourceType: providerSourceTypeBuiltin,
},
},
},
wantedProviders: []genericprovider.GenericProvider{
generateGenericProvider(clusterctlv1.CoreProviderType, "cluster-api", "capi-system", "v1.6.0", "", ""),
generateGenericProvider(clusterctlv1.CoreProviderType, "cluster-api", "capi-system", "v1.8.0", "", ""),
},
wantErr: false,
opts: &initOptions{
coreProvider: "cluster-api:capi-system:v1.6.0",
coreProvider: "cluster-api:capi-system:v1.8.0",
targetNamespace: "capi-operator-system",
},
},
Expand All @@ -80,18 +80,18 @@ func TestUpgradePlan(t *testing.T) {
Name: "docker",
Namespace: "capi-system",
Type: "infrastructure",
CurrentVersion: "v1.6.0",
CurrentVersion: "v1.8.0",
Source: "https://github.com/kubernetes-sigs/cluster-api/releases/latest/core-components.yaml",
SourceType: providerSourceTypeCustomURL,
},
},
},
wantedProviders: []genericprovider.GenericProvider{
generateGenericProvider(clusterctlv1.InfrastructureProviderType, "docker", "capi-system", "v1.6.0", "", ""),
generateGenericProvider(clusterctlv1.InfrastructureProviderType, "docker", "capi-system", "v1.8.0", "", ""),
},
wantErr: false,
opts: &initOptions{
infrastructureProviders: []string{"docker:capi-system:v1.6.0"},
infrastructureProviders: []string{"docker:capi-system:v1.8.0"},
targetNamespace: "capi-operator-system",
},
},
Expand Down
2 changes: 1 addition & 1 deletion hack/cert-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

CERT_MANAGER_VERSION=v1.14.5
CERT_MANAGER_VERSION=v1.15.1
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml
8 changes: 4 additions & 4 deletions test/e2e/air_gapped_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var _ = Describe("Install Core Provider in an air-gapped environment", func() {
bootstrapCluster := bootstrapClusterProxy.GetClient()
configMaps := []corev1.ConfigMap{}

for _, fileName := range []string{"core-cluster-api-v1.5.4.yaml", "core-cluster-api-v1.6.0.yaml"} {
for _, fileName := range []string{"core-cluster-api-v1.7.7.yaml", "core-cluster-api-v1.8.0.yaml"} {
coreProviderComponents, err := os.ReadFile(customManifestsFolder + fileName)
Expect(err).ToNot(HaveOccurred(), "Failed to read the core provider manifests file")

Expand Down Expand Up @@ -85,7 +85,7 @@ var _ = Describe("Install Core Provider in an air-gapped environment", func() {
},
},
},
Version: "v1.5.4",
Version: "v1.7.7",
},
},
}
Expand All @@ -109,7 +109,7 @@ var _ = Describe("Install Core Provider in an air-gapped environment", func() {
}), e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
})

It("should successfully upgrade a CoreProvider (v1.5.4 -> latest)", func() {
It("should successfully upgrade a CoreProvider (v1.7.7 -> latest)", func() {
bootstrapCluster := bootstrapClusterProxy.GetClient()
coreProvider := &operatorv1.CoreProvider{}
key := client.ObjectKey{Namespace: capiSystemNamespace, Name: coreProviderName}
Expand Down Expand Up @@ -161,7 +161,7 @@ var _ = Describe("Install Core Provider in an air-gapped environment", func() {
bootstrapCluster := bootstrapClusterProxy.GetClient()
configMaps := []corev1.ConfigMap{}

for _, fileName := range []string{"core-cluster-api-v1.5.4.yaml", "core-cluster-api-v1.6.0.yaml"} {
for _, fileName := range []string{"core-cluster-api-v1.7.7.yaml", "core-cluster-api-v1.8.0.yaml"} {
coreProviderComponents, err := os.ReadFile(customManifestsFolder + fileName)
Expect(err).ToNot(HaveOccurred(), "Failed to read the core provider manifests file")

Expand Down
26 changes: 13 additions & 13 deletions test/e2e/helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
manifests, err := helmChart.Run(map[string]string{
"configSecret.name": "test-secret-name",
"configSecret.namespace": "test-secret-namespace",
"core": "capi-custom-ns:cluster-api:v1.5.4",
"controlPlane": "kubeadm-control-plane-custom-ns:kubeadm:v1.5.4",
"bootstrap": "kubeadm-bootstrap-custom-ns:kubeadm:v1.5.4",
"infrastructure": "capd-custom-ns:docker:v1.5.4",
"addon": "helm-custom-ns:helm:v0.1.0-alpha.9",
"core": "capi-custom-ns:cluster-api:v1.7.7",
"controlPlane": "kubeadm-control-plane-custom-ns:kubeadm:v1.7.7",
"bootstrap": "kubeadm-bootstrap-custom-ns:kubeadm:v1.7.7",
"infrastructure": "capd-custom-ns:docker:v1.7.7",
"addon": "helm-custom-ns:helm:v0.2.6",
})
Expect(err).ToNot(HaveOccurred())
Expect(manifests).ToNot(BeEmpty())
Expand All @@ -72,11 +72,11 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
manifests, err := helmChart.Run(map[string]string{
"configSecret.name": "test-secret-name",
"configSecret.namespace": "test-secret-namespace",
"core": "cluster-api:v1.5.4",
"controlPlane": "kubeadm:v1.5.4",
"bootstrap": "kubeadm:v1.5.4",
"infrastructure": "docker:v1.5.4",
"addon": "helm:v0.1.0-alpha.9",
"core": "cluster-api:v1.7.7",
"controlPlane": "kubeadm:v1.7.7",
"bootstrap": "kubeadm:v1.7.7",
"infrastructure": "docker:v1.7.7",
"addon": "helm:v0.2.6",
})
Expect(err).ToNot(HaveOccurred())
Expect(manifests).ToNot(BeEmpty())
Expand Down Expand Up @@ -145,7 +145,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
manifests, err := helmChart.Run(map[string]string{
"configSecret.name": "test-secret-name",
"configSecret.namespace": "test-secret-namespace",
"infrastructure": "capd-custom-ns:docker:v1.5.4;capz-custom-ns:azure:v1.10.0",
"infrastructure": "capd-custom-ns:docker:v1.7.7;capz-custom-ns:azure:v1.10.0",
})
Expect(err).ToNot(HaveOccurred())
Expect(manifests).ToNot(BeEmpty())
Expand All @@ -158,7 +158,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
manifests, err := helmChart.Run(map[string]string{
"configSecret.name": "test-secret-name",
"configSecret.namespace": "test-secret-namespace",
"controlPlane": "kubeadm-control-plane-custom-ns:kubeadm:v1.5.4;rke2-control-plane-custom-ns:rke2:v0.3.0",
"controlPlane": "kubeadm-control-plane-custom-ns:kubeadm:v1.7.7;rke2-control-plane-custom-ns:rke2:v0.8.0",
})
Expect(err).ToNot(HaveOccurred())
Expect(manifests).ToNot(BeEmpty())
Expand All @@ -171,7 +171,7 @@ var _ = Describe("Create a proper set of manifests when using helm charts", func
manifests, err := helmChart.Run(map[string]string{
"configSecret.name": "test-secret-name",
"configSecret.namespace": "test-secret-namespace",
"bootstrap": "kubeadm-bootstrap-custom-ns:kubeadm:v1.5.4;rke2-bootstrap-custom-ns:rke2:v0.3.0",
"bootstrap": "kubeadm-bootstrap-custom-ns:kubeadm:v1.7.7;rke2-bootstrap-custom-ns:rke2:v0.8.0",
})
Expect(err).ToNot(HaveOccurred())
Expect(manifests).ToNot(BeEmpty())
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const (
operatorNamespace = "capi-operator-system"
capiSystemNamespace = "capi-system"

previousCAPIVersion = "v1.5.4"
previousCAPIVersion = "v1.7.7"

coreProviderName = "cluster-api"
coreProviderDeploymentName = "capi-controller-manager"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/minimal_configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ metadata:
e2eConfig.GetIntervals(bootstrapClusterProxy.GetName(), "wait-controllers")...)
})

It("should successfully upgrade a CoreProvider (v1.5.4 -> latest)", func() {
It("should successfully upgrade a CoreProvider (v1.7.7 -> latest)", func() {
bootstrapCluster := bootstrapClusterProxy.GetClient()
coreProvider := &operatorv1.CoreProvider{ObjectMeta: metav1.ObjectMeta{
Name: coreProviderName,
Expand Down
8 changes: 4 additions & 4 deletions test/e2e/resources/all-providers-custom-ns-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ metadata:
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
spec:
version: v1.5.4
version: v1.7.7
configSecret:
name: test-secret-name
namespace: test-secret-namespace
Expand All @@ -84,7 +84,7 @@ metadata:
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
spec:
version: v1.5.4
version: v1.7.7
configSecret:
name: test-secret-name
namespace: test-secret-namespace
Expand All @@ -100,7 +100,7 @@ metadata:
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
spec:
version: v1.5.4
version: v1.7.7
configSecret:
name: test-secret-name
namespace: test-secret-namespace
Expand All @@ -116,7 +116,7 @@ metadata:
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
spec:
version: v1.5.4
version: v1.7.7
configSecret:
name: test-secret-name
namespace: test-secret-namespace
8 changes: 4 additions & 4 deletions test/e2e/resources/all-providers-custom-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ metadata:
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
spec:
version: v1.5.4
version: v1.7.7
configSecret:
name: test-secret-name
namespace: test-secret-namespace
Expand All @@ -84,7 +84,7 @@ metadata:
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-weight": "2"
spec:
version: v1.5.4
version: v1.7.7
configSecret:
name: test-secret-name
namespace: test-secret-namespace
Expand All @@ -100,7 +100,7 @@ metadata:
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
spec:
version: v1.5.4
version: v1.7.7
configSecret:
name: test-secret-name
namespace: test-secret-namespace
Expand All @@ -116,7 +116,7 @@ metadata:
"helm.sh/hook-weight": "2"
"argocd.argoproj.io/sync-wave": "2"
spec:
version: v1.5.4
version: v1.7.7
configSecret:
name: test-secret-name
namespace: test-secret-namespace
Loading

0 comments on commit 3b6be2b

Please sign in to comment.