2018-02-11 08:51:55 +01:00
|
|
|
apiVersion: apps/v1
|
2017-08-31 18:28:57 +02:00
|
|
|
kind: DaemonSet
|
|
|
|
metadata:
|
|
|
|
name: nginx-ingress-controller
|
|
|
|
namespace: ingress
|
|
|
|
spec:
|
|
|
|
updateStrategy:
|
|
|
|
type: RollingUpdate
|
|
|
|
rollingUpdate:
|
|
|
|
maxUnavailable: 1
|
2018-02-11 08:51:55 +01:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
name: nginx-ingress-controller
|
|
|
|
phase: prod
|
2017-08-31 18:28:57 +02:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
name: nginx-ingress-controller
|
|
|
|
phase: prod
|
|
|
|
spec:
|
2020-09-10 09:35:46 +02:00
|
|
|
securityContext:
|
|
|
|
seccompProfile:
|
|
|
|
type: RuntimeDefault
|
2017-08-31 18:28:57 +02:00
|
|
|
containers:
|
|
|
|
- name: nginx-ingress-controller
|
2022-12-05 18:38:38 +01:00
|
|
|
image: registry.k8s.io/ingress-nginx/controller:v1.5.1
|
2017-08-31 18:28:57 +02:00
|
|
|
args:
|
|
|
|
- /nginx-ingress-controller
|
2022-02-17 17:55:29 +01:00
|
|
|
- --controller-class=k8s.io/public
|
2017-08-31 18:28:57 +02:00
|
|
|
- --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:
|
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
|
2020-08-29 22:38:28 +02:00
|
|
|
failureThreshold: 3
|
2019-02-09 21:23:12 +01:00
|
|
|
timeoutSeconds: 5
|
2017-10-26 07:29:20 +02:00
|
|
|
readinessProbe:
|
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
|
2020-08-29 22:38:28 +02:00
|
|
|
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-05-18 06:42:55 +02:00
|
|
|
securityContext:
|
2018-07-03 07:06:22 +02:00
|
|
|
capabilities:
|
|
|
|
add:
|
|
|
|
- NET_BIND_SERVICE
|
|
|
|
drop:
|
|
|
|
- ALL
|
2020-01-21 00:06:26 +01:00
|
|
|
runAsUser: 101 # www-data
|
2017-08-31 18:28:57 +02:00
|
|
|
restartPolicy: Always
|
2019-09-29 20:56:31 +02:00
|
|
|
terminationGracePeriodSeconds: 300
|