Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
E2E: test quickstart flow using managed topology cluster
- Loading branch information
Showing
6 changed files
with
171 additions
and
0 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: ["10.128.0.0/12"] | ||
pods: | ||
cidrBlocks: ["192.168.0.0/16"] | ||
serviceDomain: "cluster.local" | ||
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 |
122 changes: 122 additions & 0 deletions
122
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,122 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: ClusterClass | ||
metadata: | ||
name: quick-start | ||
namespace: default | ||
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 | ||
namespace: default | ||
--- | ||
kind: KubeadmControlPlaneTemplate | ||
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | ||
metadata: | ||
name: quick-start-control-plane | ||
namespace: default | ||
spec: | ||
template: | ||
spec: | ||
replicas: 1 | ||
machineTemplate: | ||
nodeDrainTimeout: 1s | ||
infrastructureRef: | ||
kind: DockerMachineTemplate | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
name: "control-plane" | ||
kubeadmConfigSpec: | ||
clusterConfiguration: | ||
controllerManager: | ||
extraArgs: { enable-hostpath-provisioner: 'true' } | ||
apiServer: | ||
certSANs: [ localhost, 127.0.0.1 ] | ||
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%' | ||
version: v1.21.2 | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: DockerMachineTemplate | ||
metadata: | ||
name: quick-start-control-plane | ||
namespace: default | ||
spec: | ||
template: | ||
spec: | ||
preLoadImages: | ||
- kindest/kindnetd:0.5.4 | ||
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 | ||
namespace: default | ||
spec: | ||
template: | ||
spec: | ||
preLoadImages: | ||
- kindest/kindnetd:0.5.4 | ||
--- | ||
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | ||
kind: KubeadmConfigTemplate | ||
metadata: | ||
name: "quick-start-docker-worker-bootstraptemplate" | ||
namespace: default | ||
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