Add feature_gates var for customizing Kubernetes feature gates (#1520)
This commit is contained in:
parent
71dca67ca2
commit
01ce09f343
6 changed files with 16 additions and 1 deletions
|
@ -67,6 +67,8 @@ following default cluster paramters:
|
||||||
OpenStack (default is unset)
|
OpenStack (default is unset)
|
||||||
* *kube_hostpath_dynamic_provisioner* - Required for use of PetSets type in
|
* *kube_hostpath_dynamic_provisioner* - Required for use of PetSets type in
|
||||||
Kubernetes
|
Kubernetes
|
||||||
|
* *kube_feature_gates* - A list of key=value pairs that describe feature gates for
|
||||||
|
alpha/experimental Kubernetes 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 `[]` (i.e. no authorization).
|
that the cluster should be configured for. Defaults to `[]` (i.e. no authorization).
|
||||||
|
|
|
@ -84,6 +84,9 @@ spec:
|
||||||
{% if authorization_modes %}
|
{% if authorization_modes %}
|
||||||
- --authorization-mode={{ authorization_modes|join(',') }}
|
- --authorization-mode={{ authorization_modes|join(',') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if kube_feature_gates %}
|
||||||
|
- --feature-gates={{ kube_feature_gates|join(',') }}
|
||||||
|
{% endif %}
|
||||||
{% if apiserver_custom_flags is string %}
|
{% if apiserver_custom_flags is string %}
|
||||||
- {{ apiserver_custom_flags }}
|
- {{ apiserver_custom_flags }}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -49,6 +49,9 @@ spec:
|
||||||
- --configure-cloud-routes=true
|
- --configure-cloud-routes=true
|
||||||
- --cluster-cidr={{ kube_pods_subnet }}
|
- --cluster-cidr={{ kube_pods_subnet }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if kube_feature_gates %}
|
||||||
|
- --feature-gates={{ kube_feature_gates|join(',') }}
|
||||||
|
{% endif %}
|
||||||
{% if controller_mgr_custom_flags is string %}
|
{% if controller_mgr_custom_flags is string %}
|
||||||
- {{ controller_mgr_custom_flags }}
|
- {{ controller_mgr_custom_flags }}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -27,6 +27,9 @@ spec:
|
||||||
- --leader-elect=true
|
- --leader-elect=true
|
||||||
- --kubeconfig={{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml
|
- --kubeconfig={{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml
|
||||||
- --v={{ kube_log_level }}
|
- --v={{ kube_log_level }}
|
||||||
|
{% if kube_feature_gates %}
|
||||||
|
- --feature-gates={{ kube_feature_gates|join(',') }}
|
||||||
|
{% endif %}
|
||||||
{% if scheduler_custom_flags is string %}
|
{% if scheduler_custom_flags is string %}
|
||||||
- {{ scheduler_custom_flags }}
|
- {{ scheduler_custom_flags }}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -55,7 +55,7 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
|
||||||
{% set node_labels %}--node-labels=node-role.kubernetes.io/node=true{% endset %}
|
{% set node_labels %}--node-labels=node-role.kubernetes.io/node=true{% endset %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
KUBELET_ARGS="{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }} {{ node_labels }} {% if kubelet_custom_flags is string %} {{kubelet_custom_flags}} {% else %}{% for flag in kubelet_custom_flags %} {{flag}} {% endfor %}{% endif %}"
|
KUBELET_ARGS="{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }} {{ node_labels }} {% if kube_feature_gates %} --feature-gates={{ kube_feature_gates|join(',') }} {% endif %} {% if kubelet_custom_flags is string %} {{kubelet_custom_flags}} {% else %}{% for flag in kubelet_custom_flags %} {{flag}} {% endfor %}{% endif %}"
|
||||||
{% if kube_network_plugin is defined and kube_network_plugin in ["calico", "weave", "canal"] %}
|
{% if kube_network_plugin is defined and kube_network_plugin in ["calico", "weave", "canal"] %}
|
||||||
KUBELET_NETWORK_PLUGIN="--network-plugin=cni --network-plugin-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
|
KUBELET_NETWORK_PLUGIN="--network-plugin=cni --network-plugin-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
|
||||||
{% elif kube_network_plugin is defined and kube_network_plugin == "weave" %}
|
{% elif kube_network_plugin is defined and kube_network_plugin == "weave" %}
|
||||||
|
|
|
@ -131,3 +131,7 @@ openstack_lbaas_monitor_max_retries: false
|
||||||
## 'RBAC' modes are tested.
|
## 'RBAC' modes are tested.
|
||||||
authorization_modes: []
|
authorization_modes: []
|
||||||
rbac_enabled: "{{ 'RBAC' in authorization_modes }}"
|
rbac_enabled: "{{ 'RBAC' in authorization_modes }}"
|
||||||
|
|
||||||
|
## List of key=value pairs that describe feature gates for
|
||||||
|
## the k8s cluster.
|
||||||
|
kube_feature_gates: []
|
||||||
|
|
Loading…
Reference in a new issue