github.com/projectcontour/contour@v1.28.2/site/content/examples/authdemo/02-auth-deployment.yaml (about)

     1  apiVersion: apps/v1
     2  kind: Deployment
     3  metadata:
     4    name: htpasswd
     5    namespace: projectcontour-auth
     6    labels:
     7      app.kubernetes.io/name: htpasswd
     8  spec:
     9    selector:
    10      matchLabels:
    11        app.kubernetes.io/name: htpasswd
    12    replicas: 1
    13    template:
    14      metadata:
    15        labels:
    16          app.kubernetes.io/name: htpasswd
    17      spec:
    18        serviceAccountName: projectcontour-auth-htpasswd
    19        containers:
    20          - name: htpasswd
    21            image: ghcr.io/projectcontour/contour-authserver:v4
    22            imagePullPolicy: IfNotPresent
    23            command:
    24              - /contour-authserver
    25            args:
    26              - htpasswd
    27              - --address=:9443
    28              - --tls-ca-path=/tls/ca.crt
    29              - --tls-cert-path=/tls/tls.crt
    30              - --tls-key-path=/tls/tls.key
    31            ports:
    32              - name: auth
    33                containerPort: 9443
    34                protocol: TCP
    35            volumeMounts:
    36              - name: tls
    37                mountPath: /tls
    38                readOnly: true
    39            resources:
    40              limits:
    41                cpu: 100m
    42                memory: 30Mi
    43        volumes:
    44          - name: tls
    45            secret:
    46              secretName: contourcert
    47  ---
    48  apiVersion: v1
    49  kind: Service
    50  metadata:
    51    name: htpasswd
    52    namespace: projectcontour-auth
    53    labels:
    54      app.kubernetes.io/name: htpasswd
    55  spec:
    56    ports:
    57      - name: auth
    58        protocol: TCP
    59        port: 9443
    60        targetPort: 9443
    61    selector:
    62      app.kubernetes.io/name: htpasswd
    63    type: ClusterIP