Skip to content

Commit a45a07d

Browse files
committed
use add op and delete extraArgs from clusterConfiguration
Signed-off-by: sivchari <shibuuuu5@gmail.com>
1 parent 9ffdbad commit a45a07d

File tree

1 file changed

+14
-27
lines changed

1 file changed

+14
-27
lines changed

test/e2e/data/infrastructure-docker/main/clusterclass-quick-start.yaml

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -424,20 +424,20 @@ spec:
424424
matchResources:
425425
controlPlane: true
426426
jsonPatches:
427-
- op: replace
428-
path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs/0"
427+
- op: add
428+
path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs/-"
429429
valueFrom:
430430
template: |
431431
name: v
432432
value: "{{ .kubeControlPlaneLogLevel }}"
433-
- op: replace
434-
path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/controllerManager/extraArgs/0"
433+
- op: add
434+
path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/controllerManager/extraArgs/-"
435435
valueFrom:
436436
template: |
437437
name: v
438438
value: "{{ .kubeControlPlaneLogLevel }}"
439-
- op: replace
440-
path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/scheduler/extraArgs/0"
439+
- op: add
440+
path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/scheduler/extraArgs/-"
441441
valueFrom:
442442
template: |
443443
name: v
@@ -452,14 +452,14 @@ spec:
452452
matchResources:
453453
controlPlane: true
454454
jsonPatches:
455-
- op: replace
456-
path: "/spec/template/spec/kubeadmConfigSpec/joinConfiguration/nodeRegistration/kubeletExtraArgs/0"
455+
- op: add
456+
path: "/spec/template/spec/kubeadmConfigSpec/joinConfiguration/nodeRegistration/kubeletExtraArgs/-"
457457
valueFrom:
458458
template: |
459459
name: v
460460
value: "{{ .kubeletLogLevel }}"
461-
- op: replace
462-
path: "/spec/template/spec/kubeadmConfigSpec/initConfiguration/nodeRegistration/kubeletExtraArgs/0"
461+
- op: add
462+
path: "/spec/template/spec/kubeadmConfigSpec/initConfiguration/nodeRegistration/kubeletExtraArgs/-"
463463
valueFrom:
464464
template: |
465465
name: v
@@ -476,8 +476,8 @@ spec:
476476
names:
477477
- '*-worker'
478478
jsonPatches:
479-
- op: replace
480-
path: "/spec/template/spec/joinConfiguration/nodeRegistration/kubeletExtraArgs/0"
479+
- op: add
480+
path: "/spec/template/spec/joinConfiguration/nodeRegistration/kubeletExtraArgs/-"
481481
valueFrom:
482482
template: |
483483
name: v
@@ -490,8 +490,8 @@ spec:
490490
names:
491491
- '*-worker'
492492
jsonPatches:
493-
- op: replace
494-
path: "/spec/template/spec/joinConfiguration/nodeRegistration/kubeletExtraArgs/0"
493+
- op: add
494+
path: "/spec/template/spec/joinConfiguration/nodeRegistration/kubeletExtraArgs/-"
495495
valueFrom:
496496
template: |
497497
name: v
@@ -558,19 +558,6 @@ spec:
558558
nodeDrainTimeoutSeconds: 1
559559
kubeadmConfigSpec:
560560
clusterConfiguration:
561-
# extraArgs must be non-empty for control plane components to enable patches from ClusterClass to work.
562-
controllerManager:
563-
extraArgs:
564-
- name: v
565-
value: "0"
566-
scheduler:
567-
extraArgs:
568-
- name: v
569-
value: "0"
570-
apiServer:
571-
extraArgs:
572-
- name: v
573-
value: "0"
574561
# host.docker.internal is required by kubetest when running on MacOS because of the way ports are proxied.
575562
certSANs: [localhost, host.docker.internal, "::", "::1", "127.0.0.1", "0.0.0.0"]
576563
initConfiguration:

0 commit comments

Comments
 (0)