github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/package-examples/ingress-nginx/controller/deployment-ingress-nginx-controller.yaml (about)

     1  apiVersion: apps/v1
     2  kind: Deployment
     3  metadata:
     4    labels:
     5      app.kubernetes.io/component: controller
     6      app.kubernetes.io/instance: ingress-nginx
     7      app.kubernetes.io/name: ingress-nginx
     8      app.kubernetes.io/part-of: ingress-nginx
     9      app.kubernetes.io/version: 1.3.0
    10    name: ingress-nginx-controller
    11    namespace: ingress-nginx
    12  spec:
    13    minReadySeconds: 0
    14    revisionHistoryLimit: 10
    15    selector:
    16      matchLabels:
    17        app.kubernetes.io/component: controller
    18        app.kubernetes.io/instance: ingress-nginx
    19        app.kubernetes.io/name: ingress-nginx
    20    template:
    21      metadata:
    22        labels:
    23          app.kubernetes.io/component: controller
    24          app.kubernetes.io/instance: ingress-nginx
    25          app.kubernetes.io/name: ingress-nginx
    26      spec:
    27        containers:
    28        - args:
    29          - /nginx-ingress-controller
    30          - --publish-service=$(POD_NAMESPACE)/ingress-nginx-controller
    31          - --election-id=ingress-controller-leader
    32          - --controller-class=k8s.io/ingress-nginx
    33          - --ingress-class=nginx
    34          - --configmap=$(POD_NAMESPACE)/ingress-nginx-controller
    35          - --validating-webhook=:8443
    36          - --validating-webhook-certificate=/usr/local/certificates/cert
    37          - --validating-webhook-key=/usr/local/certificates/key
    38          env:
    39          - name: POD_NAME
    40            valueFrom:
    41              fieldRef:
    42                fieldPath: metadata.name
    43          - name: POD_NAMESPACE
    44            valueFrom:
    45              fieldRef:
    46                fieldPath: metadata.namespace
    47          - name: LD_PRELOAD
    48            value: /usr/local/lib/libmimalloc.so
    49          image: registry.k8s.io/ingress-nginx/controller:v1.3.0@sha256:d1707ca76d3b044ab8a28277a2466a02100ee9f58a86af1535a3edf9323ea1b5
    50          imagePullPolicy: IfNotPresent
    51          lifecycle:
    52            preStop:
    53              exec:
    54                command:
    55                - /wait-shutdown
    56          livenessProbe:
    57            failureThreshold: 5
    58            httpGet:
    59              path: /healthz
    60              port: 10254
    61              scheme: HTTP
    62            initialDelaySeconds: 10
    63            periodSeconds: 10
    64            successThreshold: 1
    65            timeoutSeconds: 1
    66          name: controller
    67          ports:
    68          - containerPort: 80
    69            name: http
    70            protocol: TCP
    71          - containerPort: 443
    72            name: https
    73            protocol: TCP
    74          - containerPort: 8443
    75            name: webhook
    76            protocol: TCP
    77          readinessProbe:
    78            failureThreshold: 3
    79            httpGet:
    80              path: /healthz
    81              port: 10254
    82              scheme: HTTP
    83            initialDelaySeconds: 10
    84            periodSeconds: 10
    85            successThreshold: 1
    86            timeoutSeconds: 1
    87          resources:
    88            requests:
    89              cpu: 100m
    90              memory: 90Mi
    91          securityContext:
    92            allowPrivilegeEscalation: true
    93            capabilities:
    94              add:
    95              - NET_BIND_SERVICE
    96              drop:
    97              - ALL
    98            runAsUser: 101
    99          volumeMounts:
   100          - mountPath: /usr/local/certificates/
   101            name: webhook-cert
   102            readOnly: true
   103        dnsPolicy: ClusterFirst
   104        nodeSelector:
   105          kubernetes.io/os: linux
   106        serviceAccountName: ingress-nginx
   107        terminationGracePeriodSeconds: 300
   108        volumes:
   109        - name: webhook-cert
   110          secret:
   111            secretName: ingress-nginx-admission
   112