2018-08-11 21:14:23 +02:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: ingress-controller-public
|
|
|
|
namespace: ingress
|
|
|
|
spec:
|
|
|
|
replicas: 2
|
|
|
|
strategy:
|
|
|
|
rollingUpdate:
|
|
|
|
maxUnavailable: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
name: ingress-controller-public
|
|
|
|
phase: prod
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
name: ingress-controller-public
|
|
|
|
phase: prod
|
2018-10-16 08:24:27 +02:00
|
|
|
annotations:
|
|
|
|
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
|
2018-08-11 21:14:23 +02:00
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: nginx-ingress-controller
|
2020-01-21 00:06:26 +01:00
|
|
|
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.27.1
|
2018-08-11 21:14:23 +02:00
|
|
|
args:
|
|
|
|
- /nginx-ingress-controller
|
|
|
|
- --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
|
|
|
|
- name: https
|
|
|
|
containerPort: 443
|
|
|
|
- name: health
|
|
|
|
containerPort: 10254
|
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: 10254
|
|
|
|
scheme: HTTP
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
periodSeconds: 10
|
|
|
|
successThreshold: 1
|
|
|
|
failureThreshold: 3
|
2019-02-09 21:23:12 +01:00
|
|
|
timeoutSeconds: 5
|
2018-08-11 21:14:23 +02:00
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: 10254
|
|
|
|
scheme: HTTP
|
|
|
|
periodSeconds: 10
|
|
|
|
successThreshold: 1
|
|
|
|
failureThreshold: 3
|
2019-02-09 21:23:12 +01:00
|
|
|
timeoutSeconds: 5
|
2019-09-29 20:56:31 +02:00
|
|
|
lifecycle:
|
|
|
|
preStop:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- /wait-shutdown
|
2018-08-11 21:14:23 +02:00
|
|
|
securityContext:
|
|
|
|
capabilities:
|
|
|
|
add:
|
|
|
|
- NET_BIND_SERVICE
|
|
|
|
drop:
|
|
|
|
- ALL
|
2020-01-21 00:06:26 +01:00
|
|
|
runAsUser: 101 # www-data
|
2018-08-11 21:14:23 +02:00
|
|
|
restartPolicy: Always
|
2019-09-29 20:56:31 +02:00
|
|
|
terminationGracePeriodSeconds: 300
|
2018-08-11 21:14:23 +02:00
|
|
|
|