145 lines
4.0 KiB
YAML
145 lines
4.0 KiB
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
labels:
|
||
|
app.kubernetes.io/component: controller
|
||
|
app.kubernetes.io/instance: ingress-nginx
|
||
|
app.kubernetes.io/name: ingress-nginx
|
||
|
app.kubernetes.io/part-of: ingress-nginx
|
||
|
app.kubernetes.io/version: 1.2.0
|
||
|
name: ingress-nginx-controller
|
||
|
namespace: ingress-nginx
|
||
|
spec:
|
||
|
minReadySeconds: 0
|
||
|
revisionHistoryLimit: 1
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app.kubernetes.io/component: controller
|
||
|
app.kubernetes.io/instance: ingress-nginx
|
||
|
app.kubernetes.io/name: ingress-nginx
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app.kubernetes.io/component: controller
|
||
|
app.kubernetes.io/instance: ingress-nginx
|
||
|
app.kubernetes.io/name: ingress-nginx
|
||
|
spec:
|
||
|
containers:
|
||
|
- args:
|
||
|
- /nginx-ingress-controller
|
||
|
- --publish-service=$(POD_NAMESPACE)/ingress-nginx-controller
|
||
|
- --election-id=ingress-controller-leader
|
||
|
- --controller-class=k8s.io/ingress-nginx
|
||
|
- --ingress-class=nginx
|
||
|
- --configmap=$(POD_NAMESPACE)/ingress-nginx-controller
|
||
|
- --validating-webhook=:8443
|
||
|
- --validating-webhook-certificate=/usr/local/certificates/cert
|
||
|
- --validating-webhook-key=/usr/local/certificates/key
|
||
|
env:
|
||
|
- name: POD_NAME
|
||
|
valueFrom:
|
||
|
fieldRef:
|
||
|
fieldPath: metadata.name
|
||
|
- name: POD_NAMESPACE
|
||
|
valueFrom:
|
||
|
fieldRef:
|
||
|
fieldPath: metadata.namespace
|
||
|
- name: LD_PRELOAD
|
||
|
value: /usr/local/lib/libmimalloc.so
|
||
|
image: k8s.gcr.io/ingress-nginx/controller:v1.2.0@sha256:d8196e3bc1e72547c5dec66d6556c0ff92a23f6d0919b206be170bc90d5f9185
|
||
|
imagePullPolicy: IfNotPresent
|
||
|
lifecycle:
|
||
|
preStop:
|
||
|
exec:
|
||
|
command:
|
||
|
- /wait-shutdown
|
||
|
livenessProbe:
|
||
|
failureThreshold: 5
|
||
|
httpGet:
|
||
|
path: /healthz
|
||
|
port: 10254
|
||
|
scheme: HTTP
|
||
|
initialDelaySeconds: 10
|
||
|
periodSeconds: 10
|
||
|
successThreshold: 1
|
||
|
timeoutSeconds: 1
|
||
|
name: controller
|
||
|
ports:
|
||
|
- containerPort: 80
|
||
|
name: http
|
||
|
protocol: TCP
|
||
|
- containerPort: 443
|
||
|
name: https
|
||
|
protocol: TCP
|
||
|
- containerPort: 8443
|
||
|
name: webhook
|
||
|
protocol: TCP
|
||
|
readinessProbe:
|
||
|
failureThreshold: 3
|
||
|
httpGet:
|
||
|
path: /healthz
|
||
|
port: 10254
|
||
|
scheme: HTTP
|
||
|
initialDelaySeconds: 10
|
||
|
periodSeconds: 10
|
||
|
successThreshold: 1
|
||
|
timeoutSeconds: 1
|
||
|
resources:
|
||
|
requests:
|
||
|
cpu: 100m
|
||
|
memory: 90Mi
|
||
|
securityContext:
|
||
|
allowPrivilegeEscalation: true
|
||
|
capabilities:
|
||
|
add:
|
||
|
- NET_BIND_SERVICE
|
||
|
drop:
|
||
|
- ALL
|
||
|
runAsUser: 101
|
||
|
volumeMounts:
|
||
|
- mountPath: /usr/local/certificates/
|
||
|
name: webhook-cert
|
||
|
readOnly: true
|
||
|
dnsPolicy: ClusterFirst
|
||
|
nodeSelector:
|
||
|
kubernetes.io/os: linux
|
||
|
serviceAccountName: ingress-nginx
|
||
|
terminationGracePeriodSeconds: 300
|
||
|
volumes:
|
||
|
- name: webhook-cert
|
||
|
secret:
|
||
|
secretName: ingress-nginx-admission
|
||
|
|
||
|
---
|
||
|
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
labels:
|
||
|
app.kubernetes.io/component: controller
|
||
|
app.kubernetes.io/instance: ingress-nginx
|
||
|
app.kubernetes.io/name: ingress-nginx
|
||
|
app.kubernetes.io/part-of: ingress-nginx
|
||
|
app.kubernetes.io/version: 1.2.0
|
||
|
name: ingress-nginx-controller
|
||
|
namespace: ingress-nginx
|
||
|
annotations:
|
||
|
metallb.universe.tf/loadBalancerIPs: 192.168.1.212
|
||
|
spec:
|
||
|
type: LoadBalancer
|
||
|
externalTrafficPolicy: Cluster
|
||
|
selector:
|
||
|
app.kubernetes.io/component: controller
|
||
|
app.kubernetes.io/instance: ingress-nginx
|
||
|
app.kubernetes.io/name: ingress-nginx
|
||
|
ports:
|
||
|
- appProtocol: http
|
||
|
name: http
|
||
|
port: 80
|
||
|
protocol: TCP
|
||
|
targetPort: http
|
||
|
- appProtocol: https
|
||
|
name: https
|
||
|
port: 443
|
||
|
protocol: TCP
|
||
|
targetPort: https
|