apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: openshift-web-console
    webconsole: "true"
  name: webconsole
  namespace: openshift-web-console
spec:
  replicas: 2
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app: openshift-web-console
      webconsole: "true"
  strategy:
    rollingUpdate:
      maxSurge: 0
      maxUnavailable: 100%
  template:
    metadata:
      labels:
        app: openshift-web-console
        webconsole: "true"
      name: webconsole
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - openshift-web-console
            topologyKey: kubernetes.io/hostname
      containers:
      - command:
        - /usr/bin/origin-web-console
        - --audit-log-path=-
        - -v=0
        - --config=/var/webconsole-config/webconsole-config.yaml
        image: '*** GENERATED ***'
        livenessProbe:
          exec:
            command:
            - /bin/sh
            - -c
            - |-
              if [[ ! -f /tmp/webconsole-config.hash ]]; then \
                md5sum /var/webconsole-config/webconsole-config.yaml > /tmp/webconsole-config.hash; \
              elif [[ $(md5sum /var/webconsole-config/webconsole-config.yaml) != $(cat /tmp/webconsole-config.hash) ]]; then \
                echo 'webconsole-config.yaml has changed.'; \
                exit 1; \
              fi && curl -k -f https://0.0.0.0:8443/console/
        name: webconsole
        ports:
        - containerPort: 8443
        readinessProbe:
          httpGet:
            path: /healthz
            port: 8443
            scheme: HTTPS
        resources:
          limits:
            cpu: 200m
            memory: 200Mi
          requests:
            cpu: 10m
            memory: 25Mi
        volumeMounts:
        - mountPath: /var/serving-cert
          name: serving-cert
        - mountPath: /var/webconsole-config
          name: webconsole-config
      nodeSelector:
        node-role.kubernetes.io/infra: "true"
      serviceAccountName: webconsole
      volumes:
      - name: serving-cert
        secret:
          defaultMode: 288
          secretName: webconsole-serving-cert
      - configMap:
          defaultMode: 288
          name: webconsole-config
        name: webconsole-config
