Skip to content

Commit 9e8e8e1

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

9 files changed

+354
-49
lines changed

templates/cluster-template-clusterclass-rke2.yaml

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

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

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ metadata:
55
spec:
66
template:
77
spec:
8+
image:
9+
computeGallery:
10+
gallery: replace-me
11+
name: replace-me
12+
version: replace-me
813
osDisk:
914
diskSizeGB: 128
1015
osType: Linux

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

+92-8
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

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

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

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ 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
1112
patches:

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

+56-8
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,55 @@ spec:
127127
path: /spec/template/spec/vmSize
128128
valueFrom:
129129
variable: controlPlaneMachineType
130+
- name: controlPlaneMachineGalleryVersionPatch
131+
definitions:
132+
- selector:
133+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
134+
kind: AzureMachineTemplate
135+
matchResources:
136+
controlPlane: true
137+
jsonPatches:
138+
- op: replace
139+
path: "/spec/template/spec/image/computeGallery/version"
140+
valueFrom:
141+
template: '{{ trimPrefix "v" (trimSuffix "+rke2r1" .builtin.cluster.topology.version) }}'
142+
- name: controlPlaneMachineGalleryNamePatch
143+
definitions:
144+
- selector:
145+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
146+
kind: AzureMachineTemplate
147+
matchResources:
148+
controlPlane: true
149+
jsonPatches:
150+
- op: replace
151+
path: "/spec/template/spec/image/computeGallery/name"
152+
valueFrom:
153+
variable: galleryName
154+
- name: controlPlaneMachineGalleryPatch
155+
definitions:
156+
- selector:
157+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
158+
kind: AzureMachineTemplate
159+
matchResources:
160+
controlPlane: true
161+
jsonPatches:
162+
- op: replace
163+
path: "/spec/template/spec/image/computeGallery/gallery"
164+
valueFrom:
165+
variable: gallery
166+
- definitions:
167+
- jsonPatches:
168+
- op: add
169+
path: "/spec/template/spec/resourceGroup"
170+
valueFrom:
171+
variable: resourceGroup
172+
selector:
173+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
174+
kind: AzureClusterTemplate
175+
matchResources:
176+
infrastructureCluster: true
177+
enabledIf: "{{ if .resourceGroup }}true{{end}}"
178+
name: clusterResourceGroupPatch
130179
- name: workerMachineType
131180
definitions:
132181
- selector:
@@ -174,4 +223,3 @@ spec:
174223
template:
175224
spec:
176225
sshPublicKey: ""
177-
vmSize: replace_me

0 commit comments

Comments
 (0)