Use kubeadm_feature_gates instead of kube_feature_gates to leverage kubeadm feature gates and not to interfere with k8s components feature gates (#7447)
This commit is contained in:
parent
420a412234
commit
d56ac216f4
4 changed files with 17 additions and 6 deletions
|
@ -79,6 +79,8 @@ following default cluster parameters:
|
||||||
OpenStack (default is unset)
|
OpenStack (default is unset)
|
||||||
* *kube_feature_gates* - A list of key=value pairs that describe feature gates for
|
* *kube_feature_gates* - A list of key=value pairs that describe feature gates for
|
||||||
alpha/experimental Kubernetes features. (defaults is `[]`)
|
alpha/experimental Kubernetes features. (defaults is `[]`)
|
||||||
|
* *kubeadm_feature_gates* - A list of key=value pairs that describe feature gates for
|
||||||
|
alpha/experimental Kubeadm features. (defaults is `[]`)
|
||||||
* *authorization_modes* - A list of [authorization mode](
|
* *authorization_modes* - A list of [authorization mode](
|
||||||
https://kubernetes.io/docs/admin/authorization/#using-flags-for-your-authorization-module)
|
https://kubernetes.io/docs/admin/authorization/#using-flags-for-your-authorization-module)
|
||||||
that the cluster should be configured for. Defaults to `['Node', 'RBAC']`
|
that the cluster should be configured for. Defaults to `['Node', 'RBAC']`
|
||||||
|
|
|
@ -90,9 +90,9 @@ networking:
|
||||||
dnsDomain: {{ dns_domain }}
|
dnsDomain: {{ dns_domain }}
|
||||||
serviceSubnet: "{{ kube_service_addresses }}{{ ',' + kube_service_addresses_ipv6 if enable_dual_stack_networks else '' }}"
|
serviceSubnet: "{{ kube_service_addresses }}{{ ',' + kube_service_addresses_ipv6 if enable_dual_stack_networks else '' }}"
|
||||||
podSubnet: "{{ kube_pods_subnet }}{{ ',' + kube_pods_subnet_ipv6 if enable_dual_stack_networks else '' }}"
|
podSubnet: "{{ kube_pods_subnet }}{{ ',' + kube_pods_subnet_ipv6 if enable_dual_stack_networks else '' }}"
|
||||||
{% if kube_feature_gates %}
|
{% if kubeadm_feature_gates %}
|
||||||
featureGates:
|
featureGates:
|
||||||
{% for feature in kube_feature_gates %}
|
{% for feature in kubeadm_feature_gates %}
|
||||||
{{ feature|replace("=", ": ") }}
|
{{ feature|replace("=", ": ") }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -192,9 +192,17 @@
|
||||||
kubelet_flexvolumes_plugins_dir: /var/lib/kubelet/volumeplugins
|
kubelet_flexvolumes_plugins_dir: /var/lib/kubelet/volumeplugins
|
||||||
when: not usr.stat.writeable
|
when: not usr.stat.writeable
|
||||||
|
|
||||||
- name: Ensure IPv6DualStack featureGate is set when enable_dual_stack_networks is true
|
- block:
|
||||||
set_fact:
|
- name: Ensure IPv6DualStack featureGate is set when enable_dual_stack_networks is true
|
||||||
kube_feature_gates: "{{ kube_feature_gates + [ 'IPv6DualStack=true' ] }}"
|
set_fact:
|
||||||
|
kube_feature_gates: "{{ kube_feature_gates + [ 'IPv6DualStack=true' ] }}"
|
||||||
|
when:
|
||||||
|
- not 'IPv6DualStack=true' in kube_feature_gates
|
||||||
|
|
||||||
|
- name: Ensure IPv6DualStack kubeadm featureGate is set when enable_dual_stack_networks is true
|
||||||
|
set_fact:
|
||||||
|
kubeadm_feature_gates: "{{ kubeadm_feature_gates + [ 'IPv6DualStack=true' ] }}"
|
||||||
|
when:
|
||||||
|
- not 'IPv6DualStack=true' in kubeadm_feature_gates
|
||||||
when:
|
when:
|
||||||
- enable_dual_stack_networks
|
- enable_dual_stack_networks
|
||||||
- not 'IPv6DualStack=true' in kube_feature_gates
|
|
||||||
|
|
|
@ -420,6 +420,7 @@ kubelet_protect_kernel_defaults: true
|
||||||
## List of key=value pairs that describe feature gates for
|
## List of key=value pairs that describe feature gates for
|
||||||
## the k8s cluster.
|
## the k8s cluster.
|
||||||
kube_feature_gates: []
|
kube_feature_gates: []
|
||||||
|
kubeadm_feature_gates: []
|
||||||
|
|
||||||
# Local volume provisioner storage classes
|
# Local volume provisioner storage classes
|
||||||
# Levarages Ansibles string to Python datatype casting. Otherwise the dict_key isn't substituted
|
# Levarages Ansibles string to Python datatype casting. Otherwise the dict_key isn't substituted
|
||||||
|
|
Loading…
Reference in a new issue