Skip to content

Commit 07e0e7b

Browse files
wip - isolating e2e
Signed-off-by: Danil-Grigorev <[email protected]>
1 parent 7a64510 commit 07e0e7b

13 files changed

+309
-71
lines changed

templates/cluster-template-clusterclass-rke2.yaml

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/flavors/clusterclass-rke2/azure-cluster-template.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ spec:
2929
sourcePorts: "*"
3030
action: "Allow"
3131
- name: node-subnet
32+
natGateway:
33+
name: node-natgateway
3234
role: node

templates/flavors/clusterclass-rke2/azure-machine-template-controlplane.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ spec:
88
osDisk:
99
diskSizeGB: 128
1010
osType: Linux
11-
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}

templates/flavors/clusterclass-rke2/azure-machine-template-worker.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ spec:
88
osDisk:
99
diskSizeGB: 30
1010
osType: Linux
11-
sshPublicKey: ${AZURE_SSH_PUBLIC_KEY_B64:=""}

templates/test/ci/cluster-template-prow-clusterclass-ci-rke2.yaml

+124-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/test/ci/cluster-template-prow-topology-rke2.yaml

+47
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: addons.cluster.x-k8s.io/v1alpha1
2+
kind: HelmChartProxy
3+
metadata:
4+
name: cloud-provider-azure-chart
5+
spec:
6+
valuesTemplate: |
7+
infra:
8+
clusterName: {{ .Cluster.metadata.name }}
9+
cloudControllerManager:
10+
clusterCIDR: {{ .Cluster.spec.clusterNetwork.pods.cidrBlocks | join "," }}
11+
logVerbosity: 4
12+
nodeSelector:
13+
node-role.kubernetes.io/control-plane: "true"

templates/test/ci/prow-clusterclass-ci-rke2/kustomization.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ resources:
66
- ../../../flavors/clusterclass-rke2/rke2-controlplane-template.yaml
77
- ../../../flavors/clusterclass-rke2/azure-cluster-template.yaml
88
- ../../../flavors/clusterclass-rke2/azure-machine-template-controlplane.yaml
9+
- ../../../flavors/clusterclass-rke2/azure-machine-template-worker.yaml
910
- rke2-config-template.yaml
1011
- ../../../azure-cluster-identity
12+
- ../../../addons/cluster-api-helm/calico.yaml
13+
- ../../../addons/cluster-api-helm/cloud-provider-azure.yaml
1114
patches:
1215
- path: patches.yaml
1316
- path: variables.yaml
17+
- path: ccm-patch.yaml
1418

1519
sortOptions:
1620
order: fifo

templates/test/ci/prow-clusterclass-ci-rke2/patches.yaml

+40-17
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ spec:
3636
path: "/spec/template/spec/files/-"
3737
valueFrom:
3838
template: |
39-
- contentFrom:
40-
secret:
41-
key: control-plane-azure.json
42-
name: "{{ .builtin.controlPlane.machineTemplate.infrastructureRef.name }}-azure-json"
43-
owner: root:root
44-
path: /etc/kubernetes/azure.json
45-
permissions: "0644"
39+
contentFrom:
40+
secret:
41+
key: control-plane-azure.json
42+
name: "{{ .builtin.controlPlane.machineTemplate.infrastructureRef.name }}-azure-json"
43+
owner: root:root
44+
path: /etc/kubernetes/azure.json
45+
permissions: "0644"
4646
- name: workerAzureJsonSecretName
4747
definitions:
4848
- selector:
@@ -127,6 +127,38 @@ spec:
127127
path: /spec/template/spec/vmSize
128128
valueFrom:
129129
variable: controlPlaneMachineType
130+
- name: controlPlaneMachineGalleryPatch
131+
definitions:
132+
- selector:
133+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
134+
kind: AzureMachineTemplate
135+
matchResources:
136+
controlPlane: true
137+
machineDeploymentClass:
138+
names:
139+
- ${CLUSTER_NAME}-worker
140+
jsonPatches:
141+
- op: add
142+
path: "/spec/template/spec/image"
143+
valueFrom:
144+
template: |
145+
computeGallery:
146+
version: {{ trimPrefix "v" (trimSuffix "+rke2r1" .builtin.cluster.topology.version) }}
147+
name: {{ .galleryName }}
148+
gallery: {{ .gallery }}
149+
- definitions:
150+
- jsonPatches:
151+
- op: add
152+
path: "/spec/template/spec/resourceGroup"
153+
valueFrom:
154+
variable: resourceGroup
155+
selector:
156+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
157+
kind: AzureClusterTemplate
158+
matchResources:
159+
infrastructureCluster: true
160+
enabledIf: "{{ if .resourceGroup }}true{{end}}"
161+
name: clusterResourceGroupPatch
130162
- name: workerMachineType
131163
definitions:
132164
- selector:
@@ -147,6 +179,7 @@ spec:
147179
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
148180
kind: AzureMachineTemplate
149181
matchResources:
182+
controlPlane: true
150183
machineDeploymentClass:
151184
names:
152185
- ${CLUSTER_NAME}-worker
@@ -165,13 +198,3 @@ spec:
165198
spec:
166199
additionalTags:
167200
replace_me_key: replace_me_val
168-
---
169-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
170-
kind: AzureMachineTemplate
171-
metadata:
172-
name: ${CLUSTER_NAME}-control-plane
173-
spec:
174-
template:
175-
spec:
176-
sshPublicKey: ""
177-
vmSize: replace_me

0 commit comments

Comments
 (0)