apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    openshiftapiservers.operator.openshift.io/operator-pull-spec: ""
    operator.openshift.io/spec-hash: "6d4a96bf85a19afc5fed72eb00934c5c87a3fe9aacb4771ccb4727dd9f3ecc6f"
  creationTimestamp: ~
  labels:
    apiserver: "true"
    app: openshift-oauth-apiserver
    revision: '0'
  name: apiserver
  namespace: openshift-oauth-apiserver
spec:
  replicas: 1
  selector:
    matchLabels:
      apiserver: "true"
      app: openshift-oauth-apiserver
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 0
  template:
    metadata:
      creationTimestamp: ~
      labels:
        apiserver: "true"
        app: openshift-oauth-apiserver
        revision: '0'
      name: openshift-oauth-apiserver
    spec:
      containers:
        -
          args:
            - |
              if [ -s /var/run/configmaps/trusted-ca-bundle/tls-ca-bundle.pem ]; then
                echo "Copying system trust bundle"
                cp -f /var/run/configmaps/trusted-ca-bundle/tls-ca-bundle.pem /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
              fi
              exec oauth-apiserver start \
                --secure-port=8443 \
                --audit-log-path=/var/log/oauth-apiserver/audit.log \
                --audit-log-format=json \
                --audit-log-maxsize=100 \
                --audit-log-maxbackup=10 \
                --etcd-cafile=/var/run/configmaps/etcd-serving-ca/ca-bundle.crt \
                --etcd-keyfile=/var/run/secrets/etcd-client/tls.key \
                --etcd-certfile=/var/run/secrets/etcd-client/tls.crt \
                --shutdown-delay-duration=3s \
                --tls-private-key-file=/var/run/secrets/serving-cert/tls.key \
                --tls-cert-file=/var/run/secrets/serving-cert/tls.crt \
                --audit-policy-file=/var/run/configmaps/audit/default.yaml \
              --cors-allowed-origins='//127\.0\.0\.1(:|$)' \
              --cors-allowed-origins='//localhost(:|$)' \
              --tls-cipher-suites=TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 \
              --tls-min-version=VersionTLS13 \
              --v=2
          command:
            - /bin/bash
            - "-ec"
          imagePullPolicy: IfNotPresent
          livenessProbe:
            httpGet:
              path: healthz
              port: 8443
              scheme: HTTPS
            initialDelaySeconds: 30
          name: oauth-apiserver
          ports:
            -
              containerPort: 8443
          readinessProbe:
            failureThreshold: 10
            httpGet:
              path: readyz
              port: 8443
              scheme: HTTPS
          resources:
            requests:
              cpu: 150m
              memory: 200Mi
          securityContext:
            privileged: true
          terminationMessagePolicy: FallbackToLogsOnError
          volumeMounts:
            -
              mountPath: /var/run/configmaps/audit
              name: audit-policies
            -
              mountPath: /var/run/secrets/etcd-client
              name: etcd-client
            -
              mountPath: /var/run/configmaps/etcd-serving-ca
              name: etcd-serving-ca
            -
              mountPath: /var/run/configmaps/trusted-ca-bundle
              name: trusted-ca-bundle
            -
              mountPath: /var/run/secrets/serving-cert
              name: serving-cert
            -
              mountPath: /var/run/secrets/encryption-config
              name: encryption-config
            -
              mountPath: /var/log/oauth-apiserver
              name: audit-dir
      initContainers:
        -
          command:
            - sh
            - "-c"
            - "chmod 0700 /var/log/oauth-apiserver"
          imagePullPolicy: IfNotPresent
          name: fix-audit-permissions
          resources: {}
          securityContext:
            privileged: true
          terminationMessagePolicy: FallbackToLogsOnError
          volumeMounts:
            -
              mountPath: /var/log/oauth-apiserver
              name: audit-dir
      nodeSelector:
        node-role.kubernetes.io/master: ""
      priorityClassName: system-node-critical
      serviceAccountName: oauth-apiserver-sa
      terminationGracePeriodSeconds: 70
      tolerations:
        -
          effect: NoSchedule
          key: node-role.kubernetes.io/master
          operator: Exists
        -
          effect: NoExecute
          key: node.kubernetes.io/unreachable
          operator: Exists
          tolerationSeconds: 120
        -
          effect: NoExecute
          key: node.kubernetes.io/not-ready
          operator: Exists
          tolerationSeconds: 120
      volumes:
        -
          configMap:
            name: audit-0
          name: audit-policies
        -
          name: etcd-client
          secret:
            secretName: etcd-client
        -
          configMap:
            name: etcd-serving-ca
          name: etcd-serving-ca
        -
          name: serving-cert
          secret:
            secretName: serving-cert
        -
          configMap:
            items:
              -
                key: ca-bundle.crt
                path: tls-ca-bundle.pem
            name: trusted-ca-bundle
            optional: true
          name: trusted-ca-bundle
        -
          name: encryption-config
          secret:
            optional: true
            secretName: encryption-config-0
        -
          hostPath:
            path: /var/log/oauth-apiserver
          name: audit-dir
status: {}

