2019-01-09 22:40:24 +01:00
|
|
|
apiVersion: apps/v1
|
2017-10-13 10:55:03 -03:00
|
|
|
kind: Deployment
|
|
|
|
|
metadata:
|
|
|
|
|
name: nginx-ingress-controller
|
|
|
|
|
spec:
|
|
|
|
|
replicas: 1
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
2017-10-16 09:55:46 -03:00
|
|
|
annotations:
|
2018-09-26 10:15:57 -03:00
|
|
|
prometheus.io/port: "10254"
|
|
|
|
|
prometheus.io/scrape: "true"
|
2017-10-13 10:55:03 -03:00
|
|
|
spec:
|
2019-09-27 10:23:12 -03:00
|
|
|
# wait up to five minutes for the drain of connections
|
|
|
|
|
terminationGracePeriodSeconds: 300
|
2017-10-13 10:55:03 -03:00
|
|
|
serviceAccountName: nginx-ingress-serviceaccount
|
|
|
|
|
containers:
|
|
|
|
|
- name: nginx-ingress-controller
|
2020-01-28 07:56:33 -03:00
|
|
|
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.28.0
|
2017-10-13 10:55:03 -03:00
|
|
|
args:
|
|
|
|
|
- /nginx-ingress-controller
|
2019-04-30 09:45:58 -07: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 15:46:51 -03:00
|
|
|
- --annotations-prefix=nginx.ingress.kubernetes.io
|
2018-06-23 08:41:57 -04:00
|
|
|
securityContext:
|
2019-01-08 00:22:42 +08:00
|
|
|
allowPrivilegeEscalation: true
|
2018-06-23 08:41:57 -04:00
|
|
|
capabilities:
|
2018-09-26 10:15:57 -03:00
|
|
|
drop:
|
2018-06-23 08:41:57 -04:00
|
|
|
- ALL
|
2018-09-26 10:15:57 -03:00
|
|
|
add:
|
2018-06-23 08:41:57 -04:00
|
|
|
- NET_BIND_SERVICE
|
2019-12-27 20:08:30 -03:00
|
|
|
# www-data -> 101
|
|
|
|
|
runAsUser: 101
|
2017-10-13 10:55:03 -03:00
|
|
|
env:
|
|
|
|
|
- name: POD_NAME
|
|
|
|
|
valueFrom:
|
|
|
|
|
fieldRef:
|
|
|
|
|
fieldPath: metadata.name
|
|
|
|
|
- name: POD_NAMESPACE
|
|
|
|
|
valueFrom:
|
|
|
|
|
fieldRef:
|
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
|
ports:
|
2018-09-26 10:15:57 -03:00
|
|
|
- name: http
|
|
|
|
|
containerPort: 80
|
2019-11-28 12:41:48 +00:00
|
|
|
protocol: TCP
|
2018-09-26 10:15:57 -03:00
|
|
|
- name: https
|
|
|
|
|
containerPort: 443
|
2019-11-28 12:41:48 +00:00
|
|
|
protocol: TCP
|
2017-10-25 01:06:11 -03:00
|
|
|
livenessProbe:
|
|
|
|
|
failureThreshold: 3
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /healthz
|
|
|
|
|
port: 10254
|
|
|
|
|
scheme: HTTP
|
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
|
periodSeconds: 10
|
|
|
|
|
successThreshold: 1
|
2019-02-06 20:19:12 -03:00
|
|
|
timeoutSeconds: 10
|
2017-10-25 01:06:11 -03:00
|
|
|
readinessProbe:
|
|
|
|
|
failureThreshold: 3
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /healthz
|
|
|
|
|
port: 10254
|
|
|
|
|
scheme: HTTP
|
|
|
|
|
periodSeconds: 10
|
|
|
|
|
successThreshold: 1
|
2019-02-06 20:19:12 -03:00
|
|
|
timeoutSeconds: 10
|
2019-09-27 10:23:12 -03:00
|
|
|
lifecycle:
|
|
|
|
|
preStop:
|
|
|
|
|
exec:
|
|
|
|
|
command:
|
|
|
|
|
- /wait-shutdown
|
2020-02-01 21:14:33 -03:00
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: LimitRange
|
|
|
|
|
metadata:
|
|
|
|
|
name: ingress-nginx
|
|
|
|
|
namespace: ingress-nginx
|
|
|
|
|
labels:
|
|
|
|
|
app.kubernetes.io/name: ingress-nginx
|
|
|
|
|
app.kubernetes.io/part-of: ingress-nginx
|
|
|
|
|
spec:
|
|
|
|
|
limits:
|
|
|
|
|
- min:
|
|
|
|
|
memory: 90Mi
|
|
|
|
|
cpu: 100m
|
|
|
|
|
type: Container
|