sigs.k8s.io/cluster-api-provider-aws@v1.5.5/test/e2e/data/infrastructure-aws/e2e_test_templates/cluster-template-ignition.yaml (about) 1 apiVersion: cluster.x-k8s.io/v1beta1 2 kind: Cluster 3 metadata: 4 labels: 5 cni: ${CLUSTER_NAME}-crs-0 6 name: ${CLUSTER_NAME} 7 spec: 8 clusterNetwork: 9 pods: 10 cidrBlocks: 11 - 192.168.0.0/16 12 controlPlaneRef: 13 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 14 kind: KubeadmControlPlane 15 name: ${CLUSTER_NAME}-control-plane 16 infrastructureRef: 17 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 18 kind: AWSCluster 19 name: ${CLUSTER_NAME} 20 --- 21 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 22 kind: AWSCluster 23 metadata: 24 name: ${CLUSTER_NAME} 25 spec: 26 region: ${AWS_REGION} 27 s3Bucket: 28 controlPlaneIAMInstanceProfile: control-plane.cluster-api-provider-aws.sigs.k8s.io 29 name: cluster-api-provider-aws-${CLUSTER_NAME}a 30 nodesIAMInstanceProfiles: 31 - nodes.cluster-api-provider-aws.sigs.k8s.io 32 sshKeyName: ${AWS_SSH_KEY_NAME} 33 --- 34 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 35 kind: KubeadmControlPlane 36 metadata: 37 name: ${CLUSTER_NAME}-control-plane 38 spec: 39 kubeadmConfigSpec: 40 clusterConfiguration: 41 apiServer: 42 extraArgs: 43 cloud-provider: aws 44 controllerManager: 45 extraArgs: 46 cloud-provider: aws 47 format: ignition 48 ignition: 49 containerLinuxConfig: 50 additionalConfig: | 51 systemd: 52 units: 53 - name: kubeadm.service 54 enabled: true 55 dropins: 56 - name: 10-flatcar.conf 57 contents: | 58 [Unit] 59 # kubeadm must run after coreos-metadata populated /run/metadata directory. 60 Requires=coreos-metadata.service 61 After=coreos-metadata.service 62 [Service] 63 # To make metadata environment variables available for pre-kubeadm commands. 64 EnvironmentFile=/run/metadata/* 65 initConfiguration: 66 nodeRegistration: 67 kubeletExtraArgs: 68 cloud-provider: aws 69 name: $${COREOS_EC2_HOSTNAME} 70 joinConfiguration: 71 nodeRegistration: 72 kubeletExtraArgs: 73 cloud-provider: aws 74 name: $${COREOS_EC2_HOSTNAME} 75 preKubeadmCommands: 76 - envsubst < /etc/kubeadm.yml > /etc/kubeadm.yml.tmp 77 - mv /etc/kubeadm.yml.tmp /etc/kubeadm.yml 78 machineTemplate: 79 infrastructureRef: 80 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 81 kind: AWSMachineTemplate 82 name: ${CLUSTER_NAME}-control-plane 83 replicas: ${CONTROL_PLANE_MACHINE_COUNT} 84 version: ${KUBERNETES_VERSION} 85 --- 86 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 87 kind: AWSMachineTemplate 88 metadata: 89 name: ${CLUSTER_NAME}-control-plane 90 spec: 91 template: 92 spec: 93 iamInstanceProfile: control-plane.cluster-api-provider-aws.sigs.k8s.io 94 imageLookupBaseOS: flatcar-stable 95 instanceType: ${AWS_CONTROL_PLANE_MACHINE_TYPE} 96 sshKeyName: ${AWS_SSH_KEY_NAME} 97 --- 98 apiVersion: cluster.x-k8s.io/v1beta1 99 kind: MachineDeployment 100 metadata: 101 name: ${CLUSTER_NAME}-md-0 102 spec: 103 clusterName: ${CLUSTER_NAME} 104 replicas: ${WORKER_MACHINE_COUNT} 105 selector: 106 matchLabels: null 107 template: 108 spec: 109 bootstrap: 110 configRef: 111 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 112 kind: KubeadmConfigTemplate 113 name: ${CLUSTER_NAME}-md-0 114 clusterName: ${CLUSTER_NAME} 115 infrastructureRef: 116 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 117 kind: AWSMachineTemplate 118 name: ${CLUSTER_NAME}-md-0 119 version: ${KUBERNETES_VERSION} 120 --- 121 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 122 kind: AWSMachineTemplate 123 metadata: 124 name: ${CLUSTER_NAME}-md-0 125 spec: 126 template: 127 spec: 128 iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io 129 imageLookupBaseOS: flatcar-stable 130 instanceType: ${AWS_NODE_MACHINE_TYPE} 131 sshKeyName: ${AWS_SSH_KEY_NAME} 132 --- 133 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 134 kind: KubeadmConfigTemplate 135 metadata: 136 name: ${CLUSTER_NAME}-md-0 137 spec: 138 template: 139 spec: 140 format: ignition 141 ignition: 142 containerLinuxConfig: 143 additionalConfig: | 144 systemd: 145 units: 146 - name: kubeadm.service 147 enabled: true 148 dropins: 149 - name: 10-flatcar.conf 150 contents: | 151 [Unit] 152 # kubeadm must run after coreos-metadata populated /run/metadata directory. 153 Requires=coreos-metadata.service 154 After=coreos-metadata.service 155 [Service] 156 # To make metadata environment variables available for pre-kubeadm commands. 157 EnvironmentFile=/run/metadata/* 158 joinConfiguration: 159 nodeRegistration: 160 kubeletExtraArgs: 161 cloud-provider: aws 162 name: $${COREOS_EC2_HOSTNAME} 163 preKubeadmCommands: 164 - envsubst < /etc/kubeadm.yml > /etc/kubeadm.yml.tmp 165 - mv /etc/kubeadm.yml.tmp /etc/kubeadm.yml 166 --- 167 apiVersion: v1 168 data: ${CNI_RESOURCES} 169 kind: ConfigMap 170 metadata: 171 name: cni-${CLUSTER_NAME}-crs-0 172 --- 173 apiVersion: addons.cluster.x-k8s.io/v1beta1 174 kind: ClusterResourceSet 175 metadata: 176 name: ${CLUSTER_NAME}-crs-0 177 spec: 178 clusterSelector: 179 matchLabels: 180 cni: ${CLUSTER_NAME}-crs-0 181 resources: 182 - kind: ConfigMap 183 name: cni-${CLUSTER_NAME}-crs-0 184 strategy: ApplyOnce