diff --git a/test/e2e/data/infrastructure-docker/v1.3/bases/cluster-with-kcp.yaml b/test/e2e/data/infrastructure-docker/v1.3/bases/cluster-with-kcp.yaml deleted file mode 100644 index d23e5343576b..000000000000 --- a/test/e2e/data/infrastructure-docker/v1.3/bases/cluster-with-kcp.yaml +++ /dev/null @@ -1,101 +0,0 @@ ---- -# DockerCluster object referenced by the Cluster object -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerCluster -metadata: - name: '${CLUSTER_NAME}' -spec: - failureDomains: - fd1: - controlPlane: true - fd2: - controlPlane: true - fd3: - controlPlane: true - fd4: - controlPlane: false - fd5: - controlPlane: false - fd6: - controlPlane: false - fd7: - controlPlane: false - fd8: - controlPlane: false ---- -# Cluster object with -# - Reference to the KubeadmControlPlane object -# - the label cni=${CLUSTER_NAME}-crs-0, so the cluster can be selected by the ClusterResourceSet. -apiVersion: cluster.x-k8s.io/v1beta1 -kind: Cluster -metadata: - name: '${CLUSTER_NAME}' - labels: - cni: "${CLUSTER_NAME}-crs-0" -spec: - clusterNetwork: - services: - cidrBlocks: ['${DOCKER_SERVICE_CIDRS}'] - pods: - cidrBlocks: ['${DOCKER_POD_CIDRS}'] - serviceDomain: '${DOCKER_SERVICE_DOMAIN}' - infrastructureRef: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerCluster - name: '${CLUSTER_NAME}' - controlPlaneRef: - kind: KubeadmControlPlane - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - name: "${CLUSTER_NAME}-control-plane" ---- -# DockerMachineTemplate object referenced by the KubeadmControlPlane object -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerMachineTemplate -metadata: - name: "${CLUSTER_NAME}-control-plane" -spec: - template: - spec: - # NOTE: If the Kubernetes version is changed in `clusterctl_upgrade_test.go` the image and SHA must be updated here. - customImage: "kindest/node:v1.26.4@sha256:f4c0d87be03d6bea69f5e5dc0adb678bb498a190ee5c38422bf751541cebe92e" - extraMounts: - - containerPath: "/var/run/docker.sock" - hostPath: "/var/run/docker.sock" - # The DOCKER_PRELOAD_IMAGES variable gets set in self-hosted E2E tests to the list of images of the E2E configuration. - preLoadImages: ${DOCKER_PRELOAD_IMAGES:-[]} ---- -# KubeadmControlPlane referenced by the Cluster object with -# - the label kcp-adoption.step2, because it should be created in the second step of the kcp-adoption test. -kind: KubeadmControlPlane -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 -metadata: - name: "${CLUSTER_NAME}-control-plane" - labels: - kcp-adoption.step2: "" -spec: - replicas: ${CONTROL_PLANE_MACHINE_COUNT} - machineTemplate: - infrastructureRef: - kind: DockerMachineTemplate - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - name: "${CLUSTER_NAME}-control-plane" - kubeadmConfigSpec: - clusterConfiguration: - controllerManager: - extraArgs: {enable-hostpath-provisioner: 'true'} - apiServer: - # host.docker.internal is required by kubetest when running on MacOS because of the way ports are proxied. - certSANs: [localhost, 127.0.0.1, 0.0.0.0, host.docker.internal] - initConfiguration: - nodeRegistration: - criSocket: unix:///var/run/containerd/containerd.sock - kubeletExtraArgs: - eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' - fail-swap-on: "false" - joinConfiguration: - nodeRegistration: - criSocket: unix:///var/run/containerd/containerd.sock - kubeletExtraArgs: - eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' - fail-swap-on: "false" - version: "${KUBERNETES_VERSION}" diff --git a/test/e2e/data/infrastructure-docker/v1.3/bases/cluster-with-topology.yaml b/test/e2e/data/infrastructure-docker/v1.3/bases/cluster-with-topology.yaml deleted file mode 100644 index 5d03ea309283..000000000000 --- a/test/e2e/data/infrastructure-docker/v1.3/bases/cluster-with-topology.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: cluster.x-k8s.io/v1beta1 -kind: Cluster -metadata: - name: '${CLUSTER_NAME}' - namespace: default - labels: - cni: "${CLUSTER_NAME}-crs-0" -spec: - clusterNetwork: - services: - cidrBlocks: ['${DOCKER_SERVICE_CIDRS}'] - pods: - cidrBlocks: ['${DOCKER_POD_CIDRS}'] - serviceDomain: '${DOCKER_SERVICE_DOMAIN}' - topology: - class: "quick-start" - version: "${KUBERNETES_VERSION}" - controlPlane: - metadata: - labels: - label-from-cluster-topology: "value-from-cluster-topology" - annotations: - annotation-from-cluster-topology: "value-from-cluster-topology" - nodeDeletionTimeout: "30s" - nodeVolumeDetachTimeout: "5m" - replicas: ${CONTROL_PLANE_MACHINE_COUNT} - workers: - machineDeployments: - - class: "default-worker" - name: "md-0" - metadata: - labels: - label-from-cluster-topology: "value-from-cluster-topology" - annotations: - annotation-from-cluster-topology: "value-from-cluster-topology" - nodeDeletionTimeout: "30s" - nodeVolumeDetachTimeout: "5m" - minReadySeconds: 5 - replicas: ${WORKER_MACHINE_COUNT} - failureDomain: fd4 - strategy: - rollingUpdate: - maxSurge: "20%" - maxUnavailable: 0 - variables: - # We set an empty value to use the default tag kubeadm init is using. - - name: etcdImageTag - value: "" - # We set an empty value to use the default tag kubeadm init is using. - - name: coreDNSImageTag - value: "" - - name: preLoadImages - # The DOCKER_PRELOAD_IMAGES variable gets set in self-hosted E2E tests to the list of images of the E2E configuration. - value: ${DOCKER_PRELOAD_IMAGES:-[]} diff --git a/test/e2e/data/infrastructure-docker/v1.3/bases/crs.yaml b/test/e2e/data/infrastructure-docker/v1.3/bases/crs.yaml deleted file mode 100644 index b1b61237dc62..000000000000 --- a/test/e2e/data/infrastructure-docker/v1.3/bases/crs.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# ConfigMap object referenced by the ClusterResourceSet object and with -# the CNI resource defined in the test config file -apiVersion: v1 -kind: ConfigMap -metadata: - name: "cni-${CLUSTER_NAME}-crs-0" -data: ${CNI_RESOURCES} -binaryData: ---- -# ClusterResourceSet object with -# a selector that targets all the Cluster with label cni=${CLUSTER_NAME}-crs-0 -apiVersion: addons.cluster.x-k8s.io/v1beta1 -kind: ClusterResourceSet -metadata: - name: "${CLUSTER_NAME}-crs-0" -spec: - strategy: ApplyOnce - clusterSelector: - matchLabels: - cni: "${CLUSTER_NAME}-crs-0" - resources: - - name: "cni-${CLUSTER_NAME}-crs-0" - kind: ConfigMap diff --git a/test/e2e/data/infrastructure-docker/v1.3/bases/md.yaml b/test/e2e/data/infrastructure-docker/v1.3/bases/md.yaml deleted file mode 100644 index 8cd39f3ea274..000000000000 --- a/test/e2e/data/infrastructure-docker/v1.3/bases/md.yaml +++ /dev/null @@ -1,57 +0,0 @@ ---- -# DockerMachineTemplate referenced by the MachineDeployment and with -# - extraMounts for the docker sock, thus allowing self-hosting test -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerMachineTemplate -metadata: - name: "${CLUSTER_NAME}-md-0" -spec: - template: - spec: - # NOTE: If the Kubernetes version is changed in `clusterctl_upgrade_test.go` the image and SHA must be updated here. - customImage: "kindest/node:v1.26.4@sha256:f4c0d87be03d6bea69f5e5dc0adb678bb498a190ee5c38422bf751541cebe92e" - extraMounts: - - containerPath: "/var/run/docker.sock" - hostPath: "/var/run/docker.sock" - # The DOCKER_PRELOAD_IMAGES variable gets set in self-hosted E2E tests to the list of images of the E2E configuration. - preLoadImages: ${DOCKER_PRELOAD_IMAGES:-[]} ---- -# KubeadmConfigTemplate referenced by the MachineDeployment -apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 -kind: KubeadmConfigTemplate -metadata: - name: "${CLUSTER_NAME}-md-0" -spec: - template: - spec: - joinConfiguration: - nodeRegistration: - criSocket: unix:///var/run/containerd/containerd.sock - kubeletExtraArgs: - eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' - fail-swap-on: "false" ---- -# MachineDeployment object -apiVersion: cluster.x-k8s.io/v1beta1 -kind: MachineDeployment -metadata: - name: "${CLUSTER_NAME}-md-0" -spec: - clusterName: "${CLUSTER_NAME}" - replicas: ${WORKER_MACHINE_COUNT} - selector: - matchLabels: - template: - spec: - clusterName: "${CLUSTER_NAME}" - version: "${KUBERNETES_VERSION}" - bootstrap: - configRef: - name: "${CLUSTER_NAME}-md-0" - apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 - kind: KubeadmConfigTemplate - infrastructureRef: - name: "${CLUSTER_NAME}-md-0" - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerMachineTemplate - failureDomain: fd4 diff --git a/test/e2e/data/infrastructure-docker/v1.3/cluster-template-topology/kustomization.yaml b/test/e2e/data/infrastructure-docker/v1.3/cluster-template-topology/kustomization.yaml deleted file mode 100644 index 44c449548234..000000000000 --- a/test/e2e/data/infrastructure-docker/v1.3/cluster-template-topology/kustomization.yaml +++ /dev/null @@ -1,3 +0,0 @@ -resources: - - ../bases/cluster-with-topology.yaml - - ../bases/crs.yaml diff --git a/test/e2e/data/infrastructure-docker/v1.3/cluster-template/kustomization.yaml b/test/e2e/data/infrastructure-docker/v1.3/cluster-template/kustomization.yaml deleted file mode 100644 index adb5919cec6f..000000000000 --- a/test/e2e/data/infrastructure-docker/v1.3/cluster-template/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -bases: -- ../bases/cluster-with-kcp.yaml -- ../bases/md.yaml -- ../bases/crs.yaml - diff --git a/test/e2e/data/infrastructure-docker/v1.3/clusterclass-quick-start.yaml b/test/e2e/data/infrastructure-docker/v1.3/clusterclass-quick-start.yaml deleted file mode 100644 index 84a9847fcb80..000000000000 --- a/test/e2e/data/infrastructure-docker/v1.3/clusterclass-quick-start.yaml +++ /dev/null @@ -1,377 +0,0 @@ -apiVersion: cluster.x-k8s.io/v1beta1 -kind: ClusterClass -metadata: - name: quick-start -spec: - controlPlane: - metadata: - labels: - label-from-clusterclass: "value-from-clusterclass" - annotations: - annotation-from-clusterclass: "value-from-clusterclass" - ref: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - kind: KubeadmControlPlaneTemplate - name: quick-start-control-plane - machineInfrastructure: - ref: - kind: DockerMachineTemplate - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - name: quick-start-control-plane - machineHealthCheck: - maxUnhealthy: 100% - unhealthyConditions: - - type: e2e.remediation.condition - status: "False" - timeout: 20s - infrastructure: - ref: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerClusterTemplate - name: quick-start-cluster - workers: - machineDeployments: - - class: default-worker - template: - metadata: - labels: - label-from-clusterclass: "value-from-clusterclass" - annotations: - annotation-from-clusterclass: "value-from-clusterclass" - bootstrap: - ref: - apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 - kind: KubeadmConfigTemplate - name: quick-start-default-worker-bootstraptemplate - infrastructure: - ref: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerMachineTemplate - name: quick-start-default-worker-machinetemplate - machineHealthCheck: - maxUnhealthy: 100% - unhealthyConditions: - - type: e2e.remediation.condition - status: "False" - timeout: 20s - variables: - - name: lbImageRepository - required: true - schema: - openAPIV3Schema: - type: string - default: kindest - - name: etcdImageTag - required: true - schema: - openAPIV3Schema: - type: string - default: "" - example: "3.5.3-0" - description: "etcdImageTag sets the tag for the etcd image." - - name: coreDNSImageTag - required: true - schema: - openAPIV3Schema: - type: string - default: "" - example: "v1.8.5" - description: "coreDNSImageTag sets the tag for the coreDNS image." - - name: kubeadmControlPlaneMaxSurge - required: false - schema: - openAPIV3Schema: - type: string - default: "" - example: "0" - description: "kubeadmControlPlaneMaxSurge is the maximum number of control planes that can be scheduled above or under the desired number of control plane machines." - - name: preLoadImages - required: false - schema: - openAPIV3Schema: - default: [] - type: array - items: - type: string - description: "preLoadImages sets the images for the docker machines to preload." - - name: controlPlaneTaint - required: false - schema: - openAPIV3Schema: - type: boolean - default: true - patches: - - name: lbImageRepository - definitions: - - selector: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerClusterTemplate - matchResources: - infrastructureCluster: true - jsonPatches: - - op: add - path: "/spec/template/spec/loadBalancer" - valueFrom: - template: | - imageRepository: {{ .lbImageRepository }} - # We have to pin the cgroupDriver to cgroupfs for Kubernetes < v1.24 because kind does not support systemd for those versions, but kubeadm >= 1.21 defaults to systemd. - - name: cgroupDriver-controlPlane - description: | - Sets the cgroupDriver to cgroupfs if a Kubernetes version < v1.24 is referenced. - This is required because kind and the node images do not support the default - systemd cgroupDriver for kubernetes < v1.24. - enabledIf: '{{ semverCompare "<= v1.23" .builtin.controlPlane.version }}' - definitions: - - selector: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - kind: KubeadmControlPlaneTemplate - matchResources: - controlPlane: true - jsonPatches: - - op: add - path: "/spec/template/spec/kubeadmConfigSpec/initConfiguration/nodeRegistration/kubeletExtraArgs/cgroup-driver" - value: cgroupfs - - op: add - path: "/spec/template/spec/kubeadmConfigSpec/joinConfiguration/nodeRegistration/kubeletExtraArgs/cgroup-driver" - value: cgroupfs - - name: cgroupDriver-machineDeployment - description: | - Sets the cgroupDriver to cgroupfs if a Kubernetes version < v1.24 is referenced. - This is required because kind and the node images do not support the default - systemd cgroupDriver for kubernetes < v1.24. - enabledIf: '{{ semverCompare "<= v1.23" .builtin.machineDeployment.version }}' - definitions: - - selector: - apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 - kind: KubeadmConfigTemplate - matchResources: - machineDeploymentClass: - names: - - default-worker - jsonPatches: - - op: add - path: "/spec/template/spec/joinConfiguration/nodeRegistration/kubeletExtraArgs/cgroup-driver" - value: cgroupfs - - name: etcdImageTag - description: "Sets tag to use for the etcd image in the KubeadmControlPlane." - definitions: - - selector: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - kind: KubeadmControlPlaneTemplate - matchResources: - controlPlane: true - jsonPatches: - - op: add - path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/etcd" - valueFrom: - template: | - local: - imageTag: {{ .etcdImageTag }} - - name: coreDNSImageTag - description: "Sets tag to use for the etcd image in the KubeadmControlPlane." - definitions: - - selector: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - kind: KubeadmControlPlaneTemplate - matchResources: - controlPlane: true - jsonPatches: - - op: add - path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/dns" - valueFrom: - template: | - imageTag: {{ .coreDNSImageTag }} - - name: preloadImages - description: | - Sets the container images to preload to the node that is used for running dockerMachines. - This is especially required for self-hosted e2e tests to ensure the required controller images to be available - and reduce load to public registries. - definitions: - - selector: - apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 - kind: DockerMachineTemplate - matchResources: - controlPlane: true - machineDeploymentClass: - names: - - default-worker - jsonPatches: - - op: add - path: "/spec/template/spec/preLoadImages" - valueFrom: - variable: preLoadImages - - name: kubeadmControlPlaneMaxSurge - description: "Sets the maxSurge value used for rolloutStrategy in the KubeadmControlPlane." - enabledIf: '{{ ne .kubeadmControlPlaneMaxSurge "" }}' - definitions: - - selector: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - kind: KubeadmControlPlaneTemplate - matchResources: - controlPlane: true - jsonPatches: - - op: add - path: /spec/template/spec/rolloutStrategy/rollingUpdate/maxSurge - valueFrom: - template: "{{ .kubeadmControlPlaneMaxSurge }}" - - name: controlPlaneTaint - enabledIf: "{{ not .controlPlaneTaint }}" - definitions: - - selector: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - kind: KubeadmControlPlaneTemplate - matchResources: - controlPlane: true - jsonPatches: - - op: add - path: "/spec/template/spec/kubeadmConfigSpec/initConfiguration/nodeRegistration/taints" - value: [] - - op: add - path: "/spec/template/spec/kubeadmConfigSpec/joinConfiguration/nodeRegistration/taints" - value: [] - - name: podSecurityStandard - description: "Adds an admission configuration for PodSecurity to the kube-apiserver." - definitions: - - selector: - apiVersion: controlplane.cluster.x-k8s.io/v1beta1 - kind: KubeadmControlPlaneTemplate - matchResources: - controlPlane: true - jsonPatches: - - op: add - path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs" - value: - admission-control-config-file: "/etc/kubernetes/kube-apiserver-admission-pss.yaml" - - op: add - path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraVolumes" - value: - - name: admission-pss - hostPath: /etc/kubernetes/kube-apiserver-admission-pss.yaml - mountPath: /etc/kubernetes/kube-apiserver-admission-pss.yaml - readOnly: true - pathType: "File" - - op: add - path: "/spec/template/spec/kubeadmConfigSpec/files" - valueFrom: - template: | - - content: | - apiVersion: apiserver.config.k8s.io/v1 - kind: AdmissionConfiguration - plugins: - - name: PodSecurity - configuration: - apiVersion: pod-security.admission.config.k8s.io/v1{{ if semverCompare "< v1.25" .builtin.controlPlane.version }}beta1{{ end }} - kind: PodSecurityConfiguration - defaults: - enforce: "baseline" - enforce-version: "latest" - audit: "baseline" - audit-version: "latest" - warn: "baseline" - warn-version: "latest" - exemptions: - usernames: [] - runtimeClasses: [] - namespaces: [kube-system] - path: /etc/kubernetes/kube-apiserver-admission-pss.yaml - enabledIf: '{{ semverCompare ">= v1.24" .builtin.controlPlane.version }}' ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerClusterTemplate -metadata: - name: quick-start-cluster -spec: - template: - spec: - failureDomains: - fd1: - controlPlane: true - fd2: - controlPlane: true - fd3: - controlPlane: true - fd4: - controlPlane: false - fd5: - controlPlane: false - fd6: - controlPlane: false - fd7: - controlPlane: false - fd8: - controlPlane: false ---- -kind: KubeadmControlPlaneTemplate -apiVersion: controlplane.cluster.x-k8s.io/v1beta1 -metadata: - name: quick-start-control-plane -spec: - template: - spec: - rolloutBefore: - certificatesExpiryDays: 21 - machineTemplate: - nodeDrainTimeout: 1s - kubeadmConfigSpec: - clusterConfiguration: - controllerManager: - extraArgs: { enable-hostpath-provisioner: 'true' } - apiServer: - # host.docker.internal is required by kubetest when running on MacOS because of the way ports are proxied. - certSANs: [localhost, 127.0.0.1, 0.0.0.0, host.docker.internal] - initConfiguration: - nodeRegistration: - # We have to set the criSocket to containerd as kubeadm defaults to docker runtime if both containerd and docker sockets are found - criSocket: unix:///var/run/containerd/containerd.sock - kubeletExtraArgs: - eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' - fail-swap-on: "false" - joinConfiguration: - nodeRegistration: - # We have to set the criSocket to containerd as kubeadm defaults to docker runtime if both containerd and docker sockets are found - criSocket: unix:///var/run/containerd/containerd.sock - kubeletExtraArgs: - eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' - fail-swap-on: "false" ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerMachineTemplate -metadata: - name: quick-start-control-plane -spec: - template: - spec: - # NOTE: If the Kubernetes version is changed in `clusterctl_upgrade_test.go` the image and SHA must be updated here. - customImage: "kindest/node:v1.26.4@sha256:f4c0d87be03d6bea69f5e5dc0adb678bb498a190ee5c38422bf751541cebe92e" - extraMounts: - - containerPath: "/var/run/docker.sock" - hostPath: "/var/run/docker.sock" ---- -apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 -kind: DockerMachineTemplate -metadata: - name: quick-start-default-worker-machinetemplate -spec: - template: - spec: - # NOTE: If the Kubernetes version is changed in `clusterctl_upgrade_test.go` the image and SHA must be updated here. - customImage: "kindest/node:v1.26.4@sha256:f4c0d87be03d6bea69f5e5dc0adb678bb498a190ee5c38422bf751541cebe92e" - extraMounts: - - containerPath: "/var/run/docker.sock" - hostPath: "/var/run/docker.sock" ---- -apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 -kind: KubeadmConfigTemplate -metadata: - name: quick-start-default-worker-bootstraptemplate -spec: - template: - spec: - joinConfiguration: - nodeRegistration: - # We have to set the criSocket to containerd as kubeadm defaults to docker runtime if both containerd and docker sockets are found - criSocket: unix:///var/run/containerd/containerd.sock - kubeletExtraArgs: - eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' - fail-swap-on: "false" -