apiVersion: apps/v1 kind: Deployment metadata: labels: component: controller app: ingress-nginx-default name: ingress-nginx-controller-default namespace: ingress-nginx spec: replicas: 1 minReadySeconds: 0 revisionHistoryLimit: 10 selector: matchLabels: component: controller app: ingress-nginx-default strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 1 type: RollingUpdate template: metadata: labels: component: controller app: ingress-nginx-default tier: ingress-nginx spec: containers: - args: - /nginx-ingress-controller - --election-id=ingress-controller-leader-default - --controller-class=k8s.io/ingress-nginx # ingressclass.spec.controller - --ingress-class=nginx - --watch-ingress-without-class - --configmap=$(POD_NAMESPACE)/ingress-nginx-controller-default - --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services - --udp-services-configmap=$(POD_NAMESPACE)/udp-services - --validating-webhook=:8443 - --validating-webhook-certificate=/usr/local/certificates/cert - --validating-webhook-key=/usr/local/certificates/key - --default-backend-service=$(POD_NAMESPACE)/nginx-errors 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: registry.cn-hangzhou.aliyuncs.com/zhengyu1992/ingress-nginx-controller:v1.2.0 #image: harbor.uenpay.com/base/ingress-nginx-controller:v1.2.0 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 hostNetwork: true nodeSelector: nginx-ingress-controller: "1" tolerations: - effect: NoSchedule key: node.kubernetes.io/unschedulable - effect: NoSchedule key: node-role.kubernetes.io/master - effect: NoSchedule key: node-role.kubernetes.io/control-plane serviceAccountName: ingress-nginx terminationGracePeriodSeconds: 300 volumes: - name: webhook-cert secret: secretName: ingress-nginx-admission