2018-02-11 08:51:55 +01:00
|
|
|
apiVersion: apps/v1
|
2017-08-31 18:28:57 +02:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: nginx-ingress-controller
|
|
|
|
namespace: ingress
|
|
|
|
spec:
|
|
|
|
replicas: 2
|
|
|
|
strategy:
|
|
|
|
rollingUpdate:
|
|
|
|
maxUnavailable: 1
|
2018-02-11 08:51:55 +01:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
2018-02-14 09:07:36 +01:00
|
|
|
name: nginx-ingress-controller
|
2018-02-11 08:51:55 +01:00
|
|
|
phase: prod
|
2017-08-31 18:28:57 +02:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
name: nginx-ingress-controller
|
|
|
|
phase: prod
|
2018-10-16 08:24:27 +02:00
|
|
|
annotations:
|
|
|
|
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
|
2017-08-31 18:28:57 +02:00
|
|
|
spec:
|
|
|
|
nodeSelector:
|
|
|
|
node-role.kubernetes.io/node: ""
|
|
|
|
containers:
|
|
|
|
- name: nginx-ingress-controller
|
2018-11-27 06:57:34 +01:00
|
|
|
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.21.0
|
2017-08-31 18:28:57 +02:00
|
|
|
args:
|
|
|
|
- /nginx-ingress-controller
|
|
|
|
- --default-backend-service=$(POD_NAMESPACE)/default-backend
|
|
|
|
- --ingress-class=public
|
|
|
|
# use downward API
|
|
|
|
env:
|
|
|
|
- name: POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
- name: POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
containerPort: 80
|
|
|
|
hostPort: 80
|
|
|
|
- name: https
|
|
|
|
containerPort: 443
|
|
|
|
hostPort: 443
|
|
|
|
- name: health
|
|
|
|
containerPort: 10254
|
|
|
|
hostPort: 10254
|
2017-10-26 07:29:20 +02:00
|
|
|
livenessProbe:
|
|
|
|
failureThreshold: 3
|
2017-08-31 18:28:57 +02:00
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: 10254
|
|
|
|
scheme: HTTP
|
|
|
|
initialDelaySeconds: 10
|
2017-10-26 07:29:20 +02:00
|
|
|
periodSeconds: 10
|
|
|
|
successThreshold: 1
|
2017-08-31 18:28:57 +02:00
|
|
|
timeoutSeconds: 1
|
2017-10-26 07:29:20 +02:00
|
|
|
readinessProbe:
|
|
|
|
failureThreshold: 3
|
2017-08-31 18:28:57 +02:00
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: 10254
|
|
|
|
scheme: HTTP
|
2017-10-26 07:29:20 +02:00
|
|
|
periodSeconds: 10
|
|
|
|
successThreshold: 1
|
|
|
|
timeoutSeconds: 1
|
2018-05-18 06:42:55 +02:00
|
|
|
securityContext:
|
2018-07-03 07:06:22 +02:00
|
|
|
capabilities:
|
|
|
|
add:
|
|
|
|
- NET_BIND_SERVICE
|
|
|
|
drop:
|
|
|
|
- ALL
|
|
|
|
runAsUser: 33 # www-data
|
2017-08-31 18:28:57 +02:00
|
|
|
restartPolicy: Always
|
|
|
|
terminationGracePeriodSeconds: 60
|