mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-25 07:09:34 +01:00
6afc1643d9
* Add support for IngressClass and RBAC authorization * Since our nginx ingress controller example uses the flag `--ingress-class=public`, add an IngressClass to go along with it Rel: https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class
80 lines
2.1 KiB
YAML
80 lines
2.1 KiB
YAML
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
|
|
annotations:
|
|
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
|
|
spec:
|
|
containers:
|
|
- name: nginx-ingress-controller
|
|
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.32.0
|
|
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
|
|
timeoutSeconds: 5
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 10254
|
|
scheme: HTTP
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
timeoutSeconds: 5
|
|
lifecycle:
|
|
preStop:
|
|
exec:
|
|
command:
|
|
- /wait-shutdown
|
|
securityContext:
|
|
capabilities:
|
|
add:
|
|
- NET_BIND_SERVICE
|
|
drop:
|
|
- ALL
|
|
runAsUser: 101 # www-data
|
|
restartPolicy: Always
|
|
terminationGracePeriodSeconds: 300
|
|
|