From cb22353917fb7066375e5b6d2ca01b878d47f08a Mon Sep 17 00:00:00 2001 From: willie-yao Date: Tue, 12 Sep 2023 23:33:08 +0000 Subject: [PATCH] Reviews --- .../main/bases/cluster-with-topology.yaml | 4 -- .../clusterclass-quick-start-runtimesdk.yaml | 7 +++- .../main/clusterclass-quick-start.yaml | 40 ++++++++++++++----- 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/test/e2e/data/infrastructure-docker/main/bases/cluster-with-topology.yaml b/test/e2e/data/infrastructure-docker/main/bases/cluster-with-topology.yaml index c67097a69734..1fa907f3aab9 100644 --- a/test/e2e/data/infrastructure-docker/main/bases/cluster-with-topology.yaml +++ b/test/e2e/data/infrastructure-docker/main/bases/cluster-with-topology.yaml @@ -63,10 +63,6 @@ spec: replicas: ${WORKER_MACHINE_COUNT} failureDomains: - fd4 - - fd5 - - fd6 - - fd7 - - fd8 variables: # We set an empty value to use the default tag kubeadm init is using. - name: etcdImageTag diff --git a/test/e2e/data/infrastructure-docker/main/clusterclass-quick-start-runtimesdk.yaml b/test/e2e/data/infrastructure-docker/main/clusterclass-quick-start-runtimesdk.yaml index 0cc6a9eb59bb..b302ecc06776 100644 --- a/test/e2e/data/infrastructure-docker/main/clusterclass-quick-start-runtimesdk.yaml +++ b/test/e2e/data/infrastructure-docker/main/clusterclass-quick-start-runtimesdk.yaml @@ -38,6 +38,8 @@ spec: name: quick-start-default-worker-machinetemplate machinePools: - class: default-worker + namingStrategy: + template: "{{ .cluster.name }}-mp-{{ .machinePool.topologyName }}-{{ .random }}" template: bootstrap: ref: @@ -142,7 +144,10 @@ metadata: spec: template: spec: - template: {} + template: + extraMounts: + - containerPath: "/var/run/docker.sock" + hostPath: "/var/run/docker.sock" --- apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate diff --git a/test/e2e/data/infrastructure-docker/main/clusterclass-quick-start.yaml b/test/e2e/data/infrastructure-docker/main/clusterclass-quick-start.yaml index e5da91b45a88..12cfa2bf31de 100644 --- a/test/e2e/data/infrastructure-docker/main/clusterclass-quick-start.yaml +++ b/test/e2e/data/infrastructure-docker/main/clusterclass-quick-start.yaml @@ -42,7 +42,7 @@ spec: ref: apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate - name: quick-start-default-worker-bootstraptemplate + name: quick-start-md-default-worker-bootstraptemplate infrastructure: ref: apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 @@ -66,7 +66,7 @@ spec: ref: apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate - name: quick-start-default-worker-bootstraptemplate + name: quick-start-mp-default-worker-bootstraptemplate infrastructure: ref: apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 @@ -488,33 +488,53 @@ kind: DockerMachinePoolTemplate metadata: name: quick-start-default-worker-machinepooltemplate labels: - InfraMachineTemplate.machinePool.label: "InfraMachineTemplate.machinePool.labelValue" + InfraMachinePoolTemplate.machinePool.label: "InfraMachinePoolTemplate.machinePool.labelValue" annotations: - InfraMachineTemplate.machinePool.annotation: "InfraMachineTemplate.machinePool.annotationValue" + InfraMachinePoolTemplate.machinePool.annotation: "InfraMachinePoolTemplate.machinePool.annotationValue" spec: template: spec: - template: {} + template: + 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 + name: quick-start-md-default-worker-bootstraptemplate labels: BootstrapConfigTemplate.machineDeployment.label: "BootstrapConfigTemplate.machineDeployment.labelValue" - BootstrapConfigTemplate.machinePool.label: "BootstrapConfigTemplate.machinePool.labelValue" annotations: BootstrapConfigTemplate.machineDeployment.annotation: "BootstrapConfigTemplate.machineDeployment.annotationValue" - BootstrapConfigTemplate.machinePool.annotation: "BootstrapConfigTemplate.machinePool.annotationValue" spec: template: metadata: labels: BootstrapConfigTemplate.machineDeployment.template.label: "BootstrapConfigTemplate.machineDeployment.template.labelValue" - BootstrapConfigTemplate.machinePool.label: "BootstrapConfigTemplate.machinePool.labelValue" annotations: BootstrapConfigTemplate.machineDeployment.template.annotation: "BootstrapConfigTemplate.machineDeployment.template.annotationValue" - BootstrapConfigTemplate.machinePool.annotation: "BootstrapConfigTemplate.machinePool.annotationValue" + spec: + joinConfiguration: + nodeRegistration: # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. + kubeletExtraArgs: # having a not empty kubeletExtraArgs is required for the externalCloudProvider to work + eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' +--- +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +kind: KubeadmConfigTemplate +metadata: + name: quick-start-mp-default-worker-bootstraptemplate + labels: + BootstrapConfigTemplate.machinePool.template.label: "BootstrapConfigTemplate.machinePool.template.labelValue" + annotations: + BootstrapConfigTemplate.machinePool.template.annotation: "BootstrapConfigTemplate.machinePool.template.annotationValue" +spec: + template: + metadata: + labels: + BootstrapConfigTemplate.machinePool.template.label: "BootstrapConfigTemplate.machinePool.template.labelValue" + annotations: + BootstrapConfigTemplate.machinePool.template.annotation: "BootstrapConfigTemplate.machinePool.template.annotationValue" spec: joinConfiguration: nodeRegistration: # node registration parameters are automatically injected by CAPD according to the kindest/node image in use.