2019-01-09 21:40:24 +00:00
|
|
|
apiVersion: apps/v1
|
2017-10-13 13:55:03 +00:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: nginx-ingress-controller
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
2017-10-16 12:55:46 +00:00
|
|
|
annotations:
|
2018-09-26 13:15:57 +00:00
|
|
|
prometheus.io/port: "10254"
|
|
|
|
prometheus.io/scrape: "true"
|
2017-10-13 13:55:03 +00:00
|
|
|
spec:
|
2019-09-27 13:23:12 +00:00
|
|
|
# wait up to five minutes for the drain of connections
|
|
|
|
terminationGracePeriodSeconds: 300
|
2017-10-13 13:55:03 +00:00
|
|
|
serviceAccountName: nginx-ingress-serviceaccount
|
|
|
|
containers:
|
|
|
|
- name: nginx-ingress-controller
|
2020-01-28 10:56:33 +00:00
|
|
|
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.28.0
|
2017-10-13 13:55:03 +00:00
|
|
|
args:
|
|
|
|
- /nginx-ingress-controller
|
2019-04-30 16:45:58 +00:00
|
|
|
- --configmap=$(POD_NAMESPACE)/$(NGINX_CONFIGMAP_NAME)
|
|
|
|
- --tcp-services-configmap=$(POD_NAMESPACE)/$(TCP_CONFIGMAP_NAME)
|
|
|
|
- --udp-services-configmap=$(POD_NAMESPACE)/$(UDP_CONFIGMAP_NAME)
|
|
|
|
- --publish-service=$(POD_NAMESPACE)/$(SERVICE_NAME)
|
2017-11-24 18:46:51 +00:00
|
|
|
- --annotations-prefix=nginx.ingress.kubernetes.io
|
2018-06-23 12:41:57 +00:00
|
|
|
securityContext:
|
2019-01-07 16:22:42 +00:00
|
|
|
allowPrivilegeEscalation: true
|
2018-06-23 12:41:57 +00:00
|
|
|
capabilities:
|
2018-09-26 13:15:57 +00:00
|
|
|
drop:
|
2018-06-23 12:41:57 +00:00
|
|
|
- ALL
|
2018-09-26 13:15:57 +00:00
|
|
|
add:
|
2018-06-23 12:41:57 +00:00
|
|
|
- NET_BIND_SERVICE
|
2019-12-27 23:08:30 +00:00
|
|
|
# www-data -> 101
|
|
|
|
runAsUser: 101
|
2017-10-13 13:55:03 +00:00
|
|
|
env:
|
|
|
|
- name: POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
- name: POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
ports:
|
2018-09-26 13:15:57 +00:00
|
|
|
- name: http
|
|
|
|
containerPort: 80
|
2019-11-28 12:41:48 +00:00
|
|
|
protocol: TCP
|
2018-09-26 13:15:57 +00:00
|
|
|
- name: https
|
|
|
|
containerPort: 443
|
2019-11-28 12:41:48 +00:00
|
|
|
protocol: TCP
|
2017-10-25 04:06:11 +00:00
|
|
|
livenessProbe:
|
|
|
|
failureThreshold: 3
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: 10254
|
|
|
|
scheme: HTTP
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
periodSeconds: 10
|
|
|
|
successThreshold: 1
|
2019-02-06 23:19:12 +00:00
|
|
|
timeoutSeconds: 10
|
2017-10-25 04:06:11 +00:00
|
|
|
readinessProbe:
|
|
|
|
failureThreshold: 3
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: 10254
|
|
|
|
scheme: HTTP
|
|
|
|
periodSeconds: 10
|
|
|
|
successThreshold: 1
|
2019-02-06 23:19:12 +00:00
|
|
|
timeoutSeconds: 10
|
2019-09-27 13:23:12 +00:00
|
|
|
lifecycle:
|
|
|
|
preStop:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- /wait-shutdown
|