From 6ea16f7d0e9c09862a7cbe8a6c6c32b25d1da216 Mon Sep 17 00:00:00 2001 From: Richard Case Date: Fri, 17 Nov 2023 14:22:28 +0100 Subject: [PATCH] fix: bump versions and change template for e2e Signed-off-by: Richard Case --- test/e2e/config/e2e_conf.yaml | 6 ++ .../cluster-template-docker.yaml | 71 +++++++++++++++++++ test/e2e/data/shared/v1beta1/metadata.yaml | 2 +- 3 files changed, 78 insertions(+), 1 deletion(-) diff --git a/test/e2e/config/e2e_conf.yaml b/test/e2e/config/e2e_conf.yaml index 2cfaaed2..10597bc8 100644 --- a/test/e2e/config/e2e_conf.yaml +++ b/test/e2e/config/e2e_conf.yaml @@ -5,6 +5,12 @@ images: loadBehavior: mustLoad - name: ghcr.io/rancher-sandbox/cluster-api-provider-rke2-controlplane:dev loadBehavior: mustLoad + - name: quay.io/jetstack/cert-manager-cainjector:v1.13.2 + loadBehavior: tryLoad + - name: quay.io/jetstack/cert-manager-webhook:v1.13.2 + loadBehavior: tryLoad + - name: quay.io/jetstack/cert-manager-controller:v1.13.2 + loadBehavior: tryLoad providers: - name: cluster-api diff --git a/test/e2e/data/infrastructure/cluster-template-docker.yaml b/test/e2e/data/infrastructure/cluster-template-docker.yaml index 017e2189..2c0f01c1 100644 --- a/test/e2e/data/infrastructure/cluster-template-docker.yaml +++ b/test/e2e/data/infrastructure/cluster-template-docker.yaml @@ -1,3 +1,66 @@ +apiVersion: v1 +data: + value: |- + # generated by kind + global + log /dev/log local0 + log /dev/log local1 notice + daemon + # limit memory usage to approximately 18 MB + # (see https://github.com/kubernetes-sigs/kind/pull/3115) + maxconn 100000 + + resolvers docker + nameserver dns 127.0.0.11:53 + + defaults + log global + mode tcp + option dontlognull + # TODO: tune these + timeout connect 5000 + timeout client 50000 + timeout server 50000 + # allow to boot despite dns don't resolve backends + default-server init-addr none + + frontend stats + bind *:8404 + stats enable + stats uri / + stats refresh 10s + + frontend control-plane + bind *:{{ .FrontendControlPlanePort }} + {{ if .IPv6 -}} + bind :::{{ .FrontendControlPlanePort }}; + {{- end }} + default_backend kube-apiservers + + backend kube-apiservers + option httpchk GET /healthz + http-check expect status 401 + # TODO: we should be verifying (!) + {{range $server, $address := .BackendServers}} + server {{ $server }} {{ JoinHostPort $address $.BackendControlPlanePort }} check check-ssl verify none resolvers docker resolve-prefer {{ if $.IPv6 -}} ipv6 {{- else -}} ipv4 {{- end }} + {{- end}} + + frontend rke2-join + bind *:9345 + {{ if .IPv6 -}} + bind :::9345; + {{- end }} + default_backend rke2-servers + + backend rke2-servers + option httpchk GET /v1-rke2/readyz + http-check expect status 403 + {{range $server, $address := .BackendServers}} + server {{ $server }} {{ $address }}:9345 check check-ssl verify none + {{- end}} +kind: ConfigMap +metadata: + name: ${CLUSTER_NAME}-lb-config --- apiVersion: cluster.x-k8s.io/v1beta1 kind: Cluster @@ -25,6 +88,10 @@ apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: DockerCluster metadata: name: ${CLUSTER_NAME} +spec: + loadBalancer: + customHAProxyConfigTemplateRef: + name: ${CLUSTER_NAME}-lb-config --- apiVersion: controlplane.cluster.x-k8s.io/v1alpha1 kind: RKE2ControlPlane @@ -36,6 +103,10 @@ spec: version: ${KUBERNETES_VERSION}+rke2r1 nodeAnnotations: test: "true" + serverConfig: + disableComponents: + kubernetesComponents: + - cloudController infrastructureRef: apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: DockerMachineTemplate diff --git a/test/e2e/data/shared/v1beta1/metadata.yaml b/test/e2e/data/shared/v1beta1/metadata.yaml index 01fd595b..37d745d2 100644 --- a/test/e2e/data/shared/v1beta1/metadata.yaml +++ b/test/e2e/data/shared/v1beta1/metadata.yaml @@ -2,5 +2,5 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: - major: 1 - minor: 3 + minor: 6 contract: v1beta1 \ No newline at end of file