Merge pull request #2567 from mirwan/node_labels_doc_plus_kube_ingress_handling
node_labels documentation and kube-ingress label definition as role_node_label
This commit is contained in:
commit
1ac978b8fa
2 changed files with 8 additions and 2 deletions
|
@ -119,7 +119,13 @@ Stack](https://github.com/kubernetes-incubator/kubespray/blob/master/docs/dns-st
|
||||||
cgroup-driver option for Kubelet. By default autodetection is used
|
cgroup-driver option for Kubelet. By default autodetection is used
|
||||||
to match Docker configuration.
|
to match Docker configuration.
|
||||||
* *node_labels* - Labels applied to nodes via kubelet --node-labels parameter.
|
* *node_labels* - Labels applied to nodes via kubelet --node-labels parameter.
|
||||||
For example, labels can be set in the inventory as variables or more widely in group_vars
|
For example, labels can be set in the inventory as variables or more widely in group_vars.
|
||||||
|
*node_labels* must be defined as a dict:
|
||||||
|
```
|
||||||
|
node_labels:
|
||||||
|
label1_name: label1_value
|
||||||
|
label2_name: label2_value
|
||||||
|
```
|
||||||
|
|
||||||
##### Custom flags for Kube Components
|
##### Custom flags for Kube Components
|
||||||
For all kube components, custom flags can be passed in. This allows for edge cases where users need changes to the default deployment that may not be applicable to all deployments. This can be done by providing a list of flags. Example:
|
For all kube components, custom flags can be passed in. This allows for edge cases where users need changes to the default deployment that may not be applicable to all deployments. This can be done by providing a list of flags. Example:
|
||||||
|
|
|
@ -88,7 +88,7 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
|
||||||
{% do role_node_labels.append('node-role.kubernetes.io/node=true') %}
|
{% do role_node_labels.append('node-role.kubernetes.io/node=true') %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif inventory_hostname in groups['kube-ingress']|default([]) %}
|
{% elif inventory_hostname in groups['kube-ingress']|default([]) %}
|
||||||
{% set node_labels %}--node-labels=node-role.kubernetes.io/ingress=true{% endset %}
|
{% do role_node_labels.append('node-role.kubernetes.io/ingress=true') %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% do role_node_labels.append('node-role.kubernetes.io/node=true') %}
|
{% do role_node_labels.append('node-role.kubernetes.io/node=true') %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue