9fc8f9a07d
Upstream Changes: - ingress-nginx 0.19.0 (https://github.com/kubernetes/ingress-nginx/releases/tag/nginx-0.19.0) Our Changes: - Sync templates with upstream changes
85 lines
2.6 KiB
Django/Jinja
85 lines
2.6 KiB
Django/Jinja
---
|
|
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: ingress-nginx-controller
|
|
namespace: {{ ingress_nginx_namespace }}
|
|
labels:
|
|
app.kubernetes.io/name: ingress-nginx
|
|
app.kubernetes.io/part-of: ingress-nginx
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: ingress-nginx
|
|
app.kubernetes.io/part-of: ingress-nginx
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: ingress-nginx
|
|
app.kubernetes.io/part-of: ingress-nginx
|
|
annotations:
|
|
prometheus.io/port: '10254'
|
|
prometheus.io/scrape: 'true'
|
|
spec:
|
|
serviceAccountName: ingress-nginx
|
|
{% if ingress_nginx_host_network %}
|
|
hostNetwork: true
|
|
{% endif %}
|
|
{% if ingress_nginx_nodeselector %}
|
|
nodeSelector:
|
|
{{ ingress_nginx_nodeselector | to_nice_yaml }}
|
|
{%- endif %}
|
|
containers:
|
|
- name: ingress-nginx-controller
|
|
image: {{ ingress_nginx_controller_image_repo }}:{{ ingress_nginx_controller_image_tag }}
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
args:
|
|
- /nginx-ingress-controller
|
|
- --default-backend-service=$(POD_NAMESPACE)/default-backend
|
|
- --configmap=$(POD_NAMESPACE)/ingress-nginx
|
|
- --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
|
|
- --udp-services-configmap=$(POD_NAMESPACE)/udp-services
|
|
- --annotations-prefix=nginx.ingress.kubernetes.io
|
|
securityContext:
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
add:
|
|
- NET_BIND_SERVICE
|
|
# www-data -> 33
|
|
runAsUser: 33
|
|
env:
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
hostPort: {{ ingress_nginx_insecure_port }}
|
|
- name: https
|
|
containerPort: 443
|
|
hostPort: {{ ingress_nginx_secure_port }}
|
|
livenessProbe:
|
|
failureThreshold: 3
|
|
httpGet:
|
|
path: /healthz
|
|
port: 10254
|
|
scheme: HTTP
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 1
|
|
readinessProbe:
|
|
failureThreshold: 3
|
|
httpGet:
|
|
path: /healthz
|
|
port: 10254
|
|
scheme: HTTP
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 1
|