From 1305c0ed50663c27da7fb3c2ff433816af63ba59 Mon Sep 17 00:00:00 2001 From: Furkat Gofurov Date: Wed, 24 Jan 2024 22:23:28 +0200 Subject: [PATCH] Fix e2e tests Signed-off-by: Furkat Gofurov --- Makefile | 2 +- metadata.yaml | 3 - test/e2e/config/e2e_conf.yaml | 119 +++++++++++------- .../cluster-template-docker.yaml | 8 +- 4 files changed, 76 insertions(+), 56 deletions(-) diff --git a/Makefile b/Makefile index 4ff91ca9..0727e546 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ GOLANGCI_LINT_VER := v1.55.1 GOLANGCI_LINT_BIN := golangci-lint GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)) -GINKGO_VER := v2.9.4 +GINKGO_VER := v2.14.0 GINKGO_BIN := ginkgo GINKGO := $(abspath $(TOOLS_BIN_DIR)/$(GINKGO_BIN)-$(GINKGO_VER)) GINKGO_PKG := github.com/onsi/ginkgo/v2/ginkgo diff --git a/metadata.yaml b/metadata.yaml index 011a4aa5..db2c55a9 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -12,6 +12,3 @@ releaseSeries: - major: 0 minor: 2 contract: v1beta1 - - major: 0 - minor: 3 - contract: v1beta1 \ No newline at end of file diff --git a/test/e2e/config/e2e_conf.yaml b/test/e2e/config/e2e_conf.yaml index 5865004e..10597bc8 100644 --- a/test/e2e/config/e2e_conf.yaml +++ b/test/e2e/config/e2e_conf.yaml @@ -16,63 +16,86 @@ providers: - name: cluster-api type: CoreProvider versions: - - name: v1.6.0 - value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.0/core-components.yaml - type: url - contract: v1beta1 - files: - - sourcePath: "../data/shared/v1beta1/metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - - old: "--leader-elect" - new: "--leader-elect=false" + - name: "v1.6.0" + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.0/core-components.yaml" + type: "url" + contract: v1beta1 + files: + - sourcePath: "../data/shared/v1beta1/metadata.yaml" + replacements: + - old: "imagePullPolicy: Always" + new: "imagePullPolicy: IfNotPresent" + - old: "--leader-elect" + new: "--leader-elect=false" - name: docker type: InfrastructureProvider versions: - - name: v1.6.0 - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.0/infrastructure-components-development.yaml" - type: url - files: - - sourcePath: "../data/infrastructure/cluster-template-docker.yaml" - - sourcePath: "../data/shared/v1beta1/metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - - old: "--leader-elect" - new: "--leader-elect=false" - - old: --metrics-addr=127.0.0.1:8080 - new: --metrics-addr=:8080 - contract: v1beta1 - + - name: "v1.6.0" + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.0/infrastructure-components-development.yaml" + type: "url" + contract: v1beta1 + files: + - sourcePath: "../data/infrastructure/cluster-template-docker.yaml" + - sourcePath: "../data/shared/v1beta1/metadata.yaml" + replacements: + - old: "imagePullPolicy: Always" + new: "imagePullPolicy: IfNotPresent" + - old: "--leader-elect" + new: "--leader-elect=false" + - old: --metrics-addr=127.0.0.1:8080 + new: --metrics-addr=:8080 - name: rke2-control-plane type: ControlPlaneProvider versions: - - name: v0.2.99 - value: "../../../controlplane/config/default" - contract: v1beta1 - files: - - sourcePath: "../../../metadata.yaml" - targetName: "metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - - old: "--leader-elect" - new: "--leader-elect=false" + - name: "v0.2.3" + value: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/download/v0.2.3/control-plane-components.yaml" + type: "url" + contract: v1beta1 + files: + - sourcePath: "../../../metadata.yaml" + targetName: "metadata.yaml" + replacements: + - old: "imagePullPolicy: Always" + new: "imagePullPolicy: IfNotPresent" + - old: "--leader-elect" + new: "--leader-elect=false" + - name: v0.2.99 + value: "../../../controlplane/config/default" + contract: v1beta1 + files: + - sourcePath: "../../../metadata.yaml" + targetName: "metadata.yaml" + replacements: + - old: "imagePullPolicy: Always" + new: "imagePullPolicy: IfNotPresent" + - old: "--leader-elect" + new: "--leader-elect=false" - name: rke2-bootstrap type: BootstrapProvider versions: - - name: v0.2.99 - value: ../../../bootstrap/config/default - contract: v1beta1 - files: - - sourcePath: "../../../metadata.yaml" - targetName: "metadata.yaml" - replacements: - - old: "imagePullPolicy: Always" - new: "imagePullPolicy: IfNotPresent" - - old: "--leader-elect" - new: "--leader-elect=false" + - name: "v0.2.3" + value: "https://github.com/rancher-sandbox/cluster-api-provider-rke2/releases/download/v0.2.3/bootstrap-components.yaml" + type: "url" + contract: v1beta1 + files: + - sourcePath: "../../../metadata.yaml" + targetName: "metadata.yaml" + replacements: + - old: "imagePullPolicy: Always" + new: "imagePullPolicy: IfNotPresent" + - old: "--leader-elect" + new: "--leader-elect=false" + - name: v0.2.99 + value: ../../../bootstrap/config/default + contract: v1beta1 + files: + - sourcePath: "../../../metadata.yaml" + targetName: "metadata.yaml" + replacements: + - old: "imagePullPolicy: Always" + new: "imagePullPolicy: IfNotPresent" + - old: "--leader-elect" + new: "--leader-elect=false" variables: KUBERNETES_VERSION_MANAGEMENT: "v1.28.0" diff --git a/test/e2e/data/infrastructure/cluster-template-docker.yaml b/test/e2e/data/infrastructure/cluster-template-docker.yaml index 2c0f01c1..03a34c4d 100644 --- a/test/e2e/data/infrastructure/cluster-template-docker.yaml +++ b/test/e2e/data/infrastructure/cluster-template-docker.yaml @@ -76,7 +76,7 @@ spec: - 10.46.0.0/16 serviceDomain: cluster.local controlPlaneRef: - apiVersion: controlplane.cluster.x-k8s.io/v1alpha1 + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 kind: RKE2ControlPlane name: ${CLUSTER_NAME}-control-plane infrastructureRef: @@ -93,7 +93,7 @@ spec: customHAProxyConfigTemplateRef: name: ${CLUSTER_NAME}-lb-config --- -apiVersion: controlplane.cluster.x-k8s.io/v1alpha1 +apiVersion: controlplane.cluster.x-k8s.io/v1beta1 kind: RKE2ControlPlane metadata: name: ${CLUSTER_NAME}-control-plane @@ -138,7 +138,7 @@ spec: clusterName: ${CLUSTER_NAME} bootstrap: configRef: - apiVersion: bootstrap.cluster.x-k8s.io/v1alpha1 + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: RKE2ConfigTemplate name: ${CLUSTER_NAME}-md-0 infrastructureRef: @@ -155,7 +155,7 @@ spec: spec: customImage: kindest/node:${KIND_IMAGE_VERSION} --- -apiVersion: bootstrap.cluster.x-k8s.io/v1alpha1 +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: RKE2ConfigTemplate metadata: name: ${CLUSTER_NAME}-md-0