Merge pull request #2488 from LuckySB/ingress-nginx-node-role
Dedicated node for ingress nginx controller
This commit is contained in:
commit
03117d9572
5 changed files with 17 additions and 0 deletions
|
@ -196,6 +196,7 @@ cephfs_provisioner_enabled: false
|
|||
|
||||
# Nginx ingress controller deployment
|
||||
ingress_nginx_enabled: false
|
||||
# ingress_nginx_host_network: false
|
||||
# ingress_nginx_namespace: "ingress-nginx"
|
||||
# ingress_nginx_insecure_port: 80
|
||||
# ingress_nginx_secure_port: 443
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
# node5
|
||||
# node6
|
||||
|
||||
# optional for dedicated ingress node
|
||||
# [kube-ingress]
|
||||
# node2
|
||||
# node3
|
||||
|
||||
# [k8s-cluster:children]
|
||||
# kube-node
|
||||
# kube-master
|
||||
|
|
|
@ -6,6 +6,7 @@ ingress_nginx_controller_image_repo: quay.io/kubernetes-ingress-controller/nginx
|
|||
ingress_nginx_controller_image_tag: 0.11.0
|
||||
|
||||
ingress_nginx_namespace: "ingress-nginx"
|
||||
ingress_nginx_host_network: false
|
||||
ingress_nginx_insecure_port: 80
|
||||
ingress_nginx_secure_port: 443
|
||||
ingress_nginx_configmap: {}
|
||||
|
|
|
@ -21,6 +21,14 @@ spec:
|
|||
k8s-app: ingress-nginx
|
||||
version: v{{ ingress_nginx_controller_image_tag }}
|
||||
spec:
|
||||
{% if ingress_nginx_host_network %}
|
||||
hostNetwork: true
|
||||
{% endif %}
|
||||
{% if 'kube-ingress' in groups and groups['kube-ingress']|length > 0 %}
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/ingress: "true"
|
||||
{% endif %}
|
||||
terminationGracePeriodSeconds: 60
|
||||
containers:
|
||||
- name: ingress-nginx-controller
|
||||
image: {{ ingress_nginx_controller_image_repo }}:{{ ingress_nginx_controller_image_tag }}
|
||||
|
|
|
@ -86,6 +86,8 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
|
|||
{% if not standalone_kubelet|bool %}
|
||||
{% set node_labels %}{{ node_labels }},node-role.kubernetes.io/node=true{% endset %}
|
||||
{% endif %}
|
||||
{% elif inventory_hostname in groups['kube-ingress']|default([]) %}
|
||||
{% set node_labels %}--node-labels=node-role.kubernetes.io/ingress=true{% endset %}
|
||||
{% else %}
|
||||
{% set node_labels %}--node-labels=node-role.kubernetes.io/node=true{% endset %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue