Dedicated node for ingress nginx controller
The ability to create dedicated node for ingress nginx controller host type network for nginx controller and add from example https://github.com/kubernetes/ingress-nginx/blob/master/docs/examples/static-ip/nginx-ingress-controller.yaml terminationGracePeriodSeconds: 60
This commit is contained in:
parent
710295bd2f
commit
1481f7d64b
4 changed files with 16 additions and 0 deletions
|
@ -189,6 +189,7 @@ cephfs_provisioner_enabled: false
|
||||||
|
|
||||||
# Nginx ingress controller deployment
|
# Nginx ingress controller deployment
|
||||||
ingress_nginx_enabled: false
|
ingress_nginx_enabled: false
|
||||||
|
# ingres_nginx_host_network: true
|
||||||
# ingress_nginx_namespace: "ingress-nginx"
|
# ingress_nginx_namespace: "ingress-nginx"
|
||||||
# ingress_nginx_insecure_port: 80
|
# ingress_nginx_insecure_port: 80
|
||||||
# ingress_nginx_secure_port: 443
|
# ingress_nginx_secure_port: 443
|
||||||
|
|
|
@ -26,6 +26,11 @@
|
||||||
# node5
|
# node5
|
||||||
# node6
|
# node6
|
||||||
|
|
||||||
|
# optional for dedicated ingress node
|
||||||
|
# [kube-ingress]
|
||||||
|
# node2
|
||||||
|
# node3
|
||||||
|
|
||||||
# [k8s-cluster:children]
|
# [k8s-cluster:children]
|
||||||
# kube-node
|
# kube-node
|
||||||
# kube-master
|
# kube-master
|
||||||
|
|
|
@ -21,6 +21,14 @@ spec:
|
||||||
k8s-app: ingress-nginx
|
k8s-app: ingress-nginx
|
||||||
version: v{{ ingress_nginx_controller_image_tag }}
|
version: v{{ ingress_nginx_controller_image_tag }}
|
||||||
spec:
|
spec:
|
||||||
|
{% if ingres_nginx_host_network is defined and ingres_nginx_host_network %}
|
||||||
|
hostNetwork: true
|
||||||
|
{% endif %}
|
||||||
|
{% if 'kube-ingress' in groups %}
|
||||||
|
nodeSelector:
|
||||||
|
node-role.kubernetes.io/ingress: "true"
|
||||||
|
{% endif %}
|
||||||
|
terminationGracePeriodSeconds: 60
|
||||||
containers:
|
containers:
|
||||||
- name: ingress-nginx-controller
|
- name: ingress-nginx-controller
|
||||||
image: {{ ingress_nginx_controller_image_repo }}:{{ ingress_nginx_controller_image_tag }}
|
image: {{ ingress_nginx_controller_image_repo }}:{{ ingress_nginx_controller_image_tag }}
|
||||||
|
|
|
@ -84,6 +84,8 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
|
||||||
{% if not standalone_kubelet|bool %}
|
{% if not standalone_kubelet|bool %}
|
||||||
{% 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 %}
|
||||||
|
{% elif inventory_hostname in groups['kube-ingress']|default([]) %}
|
||||||
|
{% set node_labels %}--node-labels=node-role.kubernetes.io/ingress=true{% endset %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% 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 %}
|
||||||
|
|
Loading…
Reference in a new issue