Skip to content

Commit

Permalink
Merge pull request #260 from furkatgofurov7/main
Browse files Browse the repository at this point in the history
fix: failing e2e tests
  • Loading branch information
richardcase authored Feb 19, 2024
2 parents 9cd0410 + 7177130 commit 1563d86
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 57 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ releaseSeries:
- major: 0
minor: 2
contract: v1beta1
- major: 0
minor: 3
contract: v1beta1
119 changes: 71 additions & 48 deletions test/e2e/config/e2e_conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions test/e2e/data/infrastructure/cluster-template-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ var _ = Describe("Workload cluster creation", func() {
Namespace: namespace.Name,
ClusterName: clusterName,
KubernetesVersion: e2eConfig.GetVariable(KubernetesVersion),
ControlPlaneMachineCount: pointer.Int64Ptr(1),
ControlPlaneMachineCount: pointer.Int64Ptr(3), //TODO: change this back to 1 when scaling is supported
WorkerMachineCount: pointer.Int64Ptr(1),
},
WaitForClusterIntervals: e2eConfig.GetIntervals(specName, "wait-cluster"),
Expand Down

0 comments on commit 1563d86

Please sign in to comment.