-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5423 from ykakarap/clusterctl_clusterclass_quicks…
…tart_e2e 🌱 e2e tests for clusterctl quickstart flow using managed topologies
- Loading branch information
Showing
6 changed files
with
170 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
test/e2e/data/infrastructure-docker/v1beta1/bases/cluster-with-topology.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
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: {} | ||
replicas: ${CONTROL_PLANE_MACHINE_COUNT} | ||
workers: | ||
machineDeployments: | ||
- class: "default-worker" | ||
name: "md-0" | ||
replicas: ${WORKER_MACHINE_COUNT} |
3 changes: 3 additions & 0 deletions
3
test/e2e/data/infrastructure-docker/v1beta1/cluster-template-topology/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
resources: | ||
- ../bases/crs.yaml | ||
- ../bases/cluster-with-topology.yaml |
119 changes: 119 additions & 0 deletions
119
test/e2e/data/infrastructure-docker/v1beta1/clusterclass-quick-start.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: ClusterClass | ||
metadata: | ||
name: quick-start | ||
spec: | ||
controlPlane: | ||
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 | ||
infrastructure: | ||
ref: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: DockerClusterTemplate | ||
name: quick-start-my-cluster | ||
workers: | ||
machineDeployments: | ||
- class: "default-worker" | ||
template: | ||
bootstrap: | ||
ref: | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
name: quick-start-docker-worker-bootstraptemplate | ||
infrastructure: | ||
ref: | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: DockerMachineTemplate | ||
name: quick-start-docker-worker-machinetemplate | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: DockerClusterTemplate | ||
metadata: | ||
name: quick-start-my-cluster | ||
--- | ||
kind: KubeadmControlPlaneTemplate | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
metadata: | ||
name: quick-start-control-plane | ||
spec: | ||
template: | ||
spec: | ||
# The replicas value be overridden by the corresponding | ||
# Cluster's spec.topology.controlPlane.replicas. | ||
replicas: 1 | ||
machineTemplate: | ||
nodeDrainTimeout: 1s | ||
# The infrastructureRef will be overridden by the corresponding | ||
# ClusterClass's spec.controlPlane.machineInfrastructure. | ||
infrastructureRef: | ||
kind: DockerMachineTemplate | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
name: "quick-start-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: /var/run/containerd/containerd.sock | ||
kubeletExtraArgs: | ||
# We have to pin the cgroupDriver to cgroupfs as kubeadm >=1.21 defaults to systemd | ||
# kind will implement systemd support in: https://github.com/kubernetes-sigs/kind/issues/1726 | ||
cgroup-driver: cgroupfs | ||
eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' | ||
joinConfiguration: | ||
nodeRegistration: | ||
criSocket: /var/run/containerd/containerd.sock | ||
kubeletExtraArgs: | ||
# We have to pin the cgroupDriver to cgroupfs as kubeadm >=1.21 defaults to systemd | ||
# kind will implement systemd support in: https://github.com/kubernetes-sigs/kind/issues/1726 | ||
cgroup-driver: cgroupfs | ||
eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' | ||
# The version value will be overridden by the corresponding | ||
# Cluster's spec.topology.version. | ||
version: v1.21.2 | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: DockerMachineTemplate | ||
metadata: | ||
name: quick-start-control-plane | ||
spec: | ||
template: | ||
spec: | ||
extraMounts: | ||
- containerPath: "/var/run/docker.sock" | ||
hostPath: "/var/run/docker.sock" | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: DockerMachineTemplate | ||
metadata: | ||
name: quick-start-docker-worker-machinetemplate | ||
spec: | ||
template: | ||
spec: {} | ||
--- | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
name: "quick-start-docker-worker-bootstraptemplate" | ||
spec: | ||
template: | ||
spec: | ||
joinConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
# We have to pin the cgroupDriver to cgroupfs as kubeadm >=1.21 defaults to systemd | ||
# kind will implement systemd support in: https://github.com/kubernetes-sigs/kind/issues/1726 | ||
cgroup-driver: cgroupfs | ||
eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters