sigs.k8s.io/cluster-api-provider-azure@v1.14.3/templates/test/ci/prow-clusterclass-ci-default/patches.yaml (about) 1 apiVersion: cluster.x-k8s.io/v1beta1 2 kind: ClusterClass 3 metadata: 4 name: ${CLUSTER_CLASS_NAME} 5 spec: 6 workers: 7 machineDeployments: 8 - class: ${CLUSTER_NAME}-worker 9 machineHealthCheck: 10 maxUnhealthy: 100% 11 unhealthyConditions: 12 - type: E2ENodeUnhealthy 13 status: "True" 14 timeout: 30s 15 template: 16 bootstrap: 17 ref: 18 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 19 kind: KubeadmConfigTemplate 20 name: ${CLUSTER_NAME}-worker 21 infrastructure: 22 ref: 23 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 24 kind: AzureMachineTemplate 25 name: ${CLUSTER_NAME}-worker 26 - class: ${CLUSTER_NAME}-worker-win 27 template: 28 bootstrap: 29 ref: 30 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 31 kind: KubeadmConfigTemplate 32 name: ${CLUSTER_NAME}-worker-win 33 infrastructure: 34 ref: 35 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 36 kind: AzureMachineTemplate 37 name: ${CLUSTER_NAME}-worker-win 38 machineHealthCheck: 39 maxUnhealthy: 100% 40 unhealthyConditions: 41 - type: E2ENodeUnhealthy 42 status: "True" 43 timeout: 30s 44 patches: 45 - name: k8sFeatureGates 46 enabledIf: "{{ if .k8sFeatureGates }}true{{end}}" 47 definitions: 48 - selector: 49 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 50 kind: KubeadmControlPlaneTemplate 51 matchResources: 52 controlPlane: true 53 jsonPatches: 54 - op: add 55 path: /spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs 56 valueFrom: 57 template: | 58 feature-gates: {{ .k8sFeatureGates }} 59 - name: controlPlaneAzureJsonSecretName 60 definitions: 61 - selector: 62 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 63 kind: KubeadmControlPlaneTemplate 64 matchResources: 65 controlPlane: true 66 jsonPatches: 67 - op: add 68 path: /spec/template/spec/kubeadmConfigSpec/clusterConfiguration/controllerManager/extraArgs/cluster-name 69 valueFrom: 70 variable: builtin.cluster.name 71 - op: replace 72 path: "/spec/template/spec/kubeadmConfigSpec/files" 73 valueFrom: 74 template: | 75 - contentFrom: 76 secret: 77 key: control-plane-azure.json 78 name: "{{ .builtin.controlPlane.machineTemplate.infrastructureRef.name }}-azure-json" 79 owner: root:root 80 path: /etc/kubernetes/azure.json 81 permissions: "0644" 82 - name: workerAzureJsonSecretName 83 definitions: 84 - selector: 85 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 86 kind: KubeadmConfigTemplate 87 matchResources: 88 machineDeploymentClass: 89 names: 90 - ${CLUSTER_NAME}-worker 91 jsonPatches: 92 - op: replace 93 path: "/spec/template/spec/files" 94 valueFrom: 95 template: | 96 - contentFrom: 97 secret: 98 key: worker-node-azure.json 99 name: "{{ .builtin.machineDeployment.infrastructureRef.name }}-azure-json" 100 owner: root:root 101 path: /etc/kubernetes/azure.json 102 permissions: "0644" 103 - name: workerAzureJsonSecretNameWin 104 definitions: 105 - selector: 106 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 107 kind: KubeadmConfigTemplate 108 matchResources: 109 machineDeploymentClass: 110 names: 111 - ${CLUSTER_NAME}-worker-win 112 jsonPatches: 113 - op: replace 114 path: "/spec/template/spec/files" 115 valueFrom: 116 template: | 117 - contentFrom: 118 secret: 119 key: worker-node-azure.json 120 name: "{{ .builtin.machineDeployment.infrastructureRef.name }}-azure-json" 121 owner: root:root 122 path: c:/k/azure.json 123 permissions: "0644" 124 - path: C:/defender-exclude-calico.ps1 125 permissions: "0744" 126 content: |- 127 Add-MpPreference -ExclusionProcess C:/opt/cni/bin/calico.exe 128 Add-MpPreference -ExclusionProcess C:/opt/cni/bin/calico-ipam.exe 129 - name: additionalTags 130 definitions: 131 - selector: 132 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 133 kind: AzureClusterTemplate 134 matchResources: 135 infrastructureCluster: true 136 jsonPatches: 137 - op: replace 138 path: /spec/template/spec/additionalTags 139 valueFrom: 140 template: | 141 buildProvenance: {{ .buildProvenance }} 142 creationTimestamp: {{ .timestamp }} 143 jobName: {{ .jobName }} 144 - name: clusterIdentityRef 145 definitions: 146 - selector: 147 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 148 kind: AzureClusterTemplate 149 matchResources: 150 infrastructureCluster: true 151 jsonPatches: 152 - op: add 153 path: /spec/template/spec/identityRef/name 154 valueFrom: 155 variable: clusterIdentityRef 156 - name: location 157 definitions: 158 - selector: 159 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 160 kind: AzureClusterTemplate 161 matchResources: 162 infrastructureCluster: true 163 jsonPatches: 164 - op: replace 165 path: /spec/template/spec/location 166 valueFrom: 167 variable: location 168 - name: subscriptionID 169 definitions: 170 - selector: 171 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 172 kind: AzureClusterTemplate 173 matchResources: 174 infrastructureCluster: true 175 jsonPatches: 176 - op: add 177 path: /spec/template/spec/subscriptionID 178 valueFrom: 179 variable: subscriptionID 180 - name: logLevel 181 definitions: 182 - selector: 183 apiVersion: controlplane.cluster.x-k8s.io/v1beta1 184 kind: KubeadmControlPlaneTemplate 185 matchResources: 186 controlPlane: true 187 jsonPatches: 188 - op: add 189 path: /spec/template/spec/kubeadmConfigSpec/clusterConfiguration/controllerManager/extraArgs/v 190 valueFrom: 191 variable: logLevel 192 - name: controlPlaneMachineType 193 definitions: 194 - selector: 195 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 196 kind: AzureMachineTemplate 197 matchResources: 198 controlPlane: true 199 jsonPatches: 200 - op: add 201 path: /spec/template/spec/vmSize 202 valueFrom: 203 variable: controlPlaneMachineType 204 - name: workerMachineType 205 definitions: 206 - selector: 207 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 208 kind: AzureMachineTemplate 209 matchResources: 210 machineDeploymentClass: 211 names: 212 - ${CLUSTER_NAME}-worker 213 jsonPatches: 214 - op: add 215 path: /spec/template/spec/vmSize 216 valueFrom: 217 variable: workerMachineType 218 - name: workerMachineTypeWin 219 definitions: 220 - selector: 221 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 222 kind: AzureMachineTemplate 223 matchResources: 224 machineDeploymentClass: 225 names: 226 - ${CLUSTER_NAME}-worker-win 227 jsonPatches: 228 - op: add 229 path: /spec/template/spec/vmSize 230 valueFrom: 231 variable: workerMachineTypeWin 232 - name: sshPublicKey 233 definitions: 234 - selector: 235 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 236 kind: AzureMachineTemplate 237 matchResources: 238 machineDeploymentClass: 239 names: 240 - ${CLUSTER_NAME}-worker 241 - ${CLUSTER_NAME}-worker-win 242 jsonPatches: 243 - op: add 244 path: /spec/template/spec/sshPublicKey 245 valueFrom: 246 variable: sshPublicKey 247 - name: sshPublicKeyWin 248 definitions: 249 - selector: 250 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 251 kind: KubeadmConfigTemplate 252 matchResources: 253 machineDeploymentClass: 254 names: 255 - ${CLUSTER_NAME}-worker-win 256 jsonPatches: 257 - op: add 258 path: /spec/template/spec/users 259 valueFrom: 260 template: | 261 - name: capi 262 groups: Administrators 263 sshAuthorizedKeys: 264 - {{ .sshPublicKey }} 265 - name: tmpFolder 266 definitions: 267 - selector: 268 apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 269 kind: KubeadmConfigTemplate 270 matchResources: 271 machineDeploymentClass: 272 names: 273 - ${CLUSTER_NAME}-worker-win 274 jsonPatches: 275 - op: add 276 path: /spec/template/spec/files/- 277 valueFrom: 278 template: | 279 content: | 280 # /tmp is assumed created and required for upstream e2e tests to pass 281 New-Item -ItemType Directory -Force -Path C:\tmp\ 282 path: C:/create-temp-folder.ps1 283 permissions: "0744" 284 - op: add 285 path: /spec/template/spec/preKubeadmCommands 286 valueFrom: 287 template: | 288 - "powershell C:/create-temp-folder.ps1" 289 --- 290 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 291 kind: AzureClusterTemplate 292 metadata: 293 name: ${CLUSTER_NAME}-azure-cluster 294 spec: 295 template: 296 spec: 297 additionalTags: 298 replace_me_key: replace_me_val 299 --- 300 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 301 kind: AzureMachineTemplate 302 metadata: 303 name: ${CLUSTER_NAME}-control-plane 304 spec: 305 template: 306 spec: 307 sshPublicKey: "" 308 vmSize: replace_me