Skip to content

Commit b5ec095

Browse files
authored
Merge pull request #25 from kishen-v/update-template
Fix kubeadm config templation
2 parents 608b902 + db2a5a0 commit b5ec095

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

kubetest2-tf/data/k8s-ansible/roles/install-k8s/templates/kubeadm.yaml.j2

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ nodeRegistration:
2121
value: {{ cgroup_driver }}
2222
{% if (feature_gates is defined) %}
2323
- name: feature-gates
24-
value: "{{ feature_gates | join(',') }}"
24+
value: "{{ feature_gates }}"
2525
{% endif %}
2626
timeouts:
2727
controlPlaneComponentHealthCheck: 4m0s
@@ -41,7 +41,7 @@ apiServer:
4141
{% if (feature_gates is defined) and (runtime_config is defined) %}
4242
extraArgs:
4343
- name: feature-gates
44-
value: "{{ feature_gates | join(',') }}"
44+
value: "{{ feature_gates }}"
4545
- name: runtime-config
4646
value: {{ runtime_config }}
4747
{% endif %}
@@ -60,23 +60,23 @@ controllerManager:
6060
value: "0.0.0.0"
6161
{% if feature_gates is defined %}
6262
- name: feature-gates
63-
value: "{{ feature_gates | join(',') }}"
63+
value: "{{ feature_gates }}"
6464
{% endif %}
6565
scheduler:
6666
extraArgs:
6767
- name: bind-address
6868
value: "0.0.0.0"
6969
{% if feature_gates is defined %}
7070
- name: feature-gates
71-
value: "{{ feature_gates | join(',') }}"
71+
value: "{{ feature_gates }}"
7272
{% endif %}
7373
---
7474
apiVersion: kubelet.config.k8s.io/v1beta1
7575
kind: KubeletConfiguration
7676
cgroupDriver: {{ cgroup_driver }}
7777
{% if feature_gates is defined %}
7878
featureGates:
79-
{% for feature in feature_gates %}
79+
{% for feature in feature_gates.split(',') %}
8080
{{ feature | replace("=", ": ") }}
8181
{% endfor %}
8282
{% endif %}
@@ -96,10 +96,6 @@ discovery:
9696
unsafeSkipCAVerification: true
9797
tlsBootstrapToken: {{ bootstrap_token }}
9898
nodeRegistration:
99-
{% if (feature_gates is defined) %}
100-
kubeletExtraArgs:
101-
feature-gates: "{{ feature_gates | join(',') }}"
102-
{% endif %}
10399
{% if (runtime is defined) and 'containerd' == runtime %}
104100
criSocket: "unix:///run/containerd/containerd.sock"
105101
{% elif (runtime is defined) and 'crio' == runtime %}

0 commit comments

Comments
 (0)