apiVersion: apps/v1
kind: Deployment
metadata:
  name: console
  namespace: console-system
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      hypercloud: ui
      app: console
  template:
    metadata:
      name: hypercloud-ui
      labels:
        hypercloud: ui
        app: console
    spec:
      serviceAccountName: console-system-admin
      containers:
      - command:
        - /opt/bridge/bin/bridge
        - --public-dir=/opt/bridge/static
        - --listen=https://0.0.0.0:6443
        - --tls-cert-file=/var/https-cert/tls.crt
        - --tls-key-file=/var/https-cert/tls.key
        - --hypercloud-endpoint=http://hypercloud4-operator-service.hypercloud4-system.svc:28677
        - --prometheus-endpoint=http://prometheus-k8s.monitoring.svc:9090/api
        - --grafana-endpoint=http://grafana.monitoring.svc:3000/
        - --kiali-endpoint=http://kiali.istio-system.svc:20001/api/kiali
        - --jaeger-endpoint=http://tracing.istio-system.svc:80/api/jaeger
        - --approval-endpoint=http://approval-proxy-server.approval-system.svc:80/approve
        - --kubeflow-endpoint=http://istio-ingressgateway.istio-system.svc:80/
        - --vnc-endpoint=http://virtvnc.kubevirt.svc:8001/
        - --hyperauth-endpoint=https://hyperauth.hyperauth.svc:8080/
        - --webhook-endpoint=https://hypercloud4-webhook-svc.hypercloud4-system.svc/api/webhook/
        - --keycloak-realm=tmax
        - --keycloak-auth-url=https://172.22.6.11/auth
        - --keycloak-client-id=hypercloud4        
        image: tmaxcloudck/hypercloud-console:4.1.4.17
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - mountPath: /var/https-cert
          name: https-cert
          readOnly: true
        - mountPath: /etc/localtime
          name: localtime
          readOnly: true
        - mountPath: /etc/timezone
          name: timezone
          readOnly: true
        name: console
        ports:
        - containerPort: 6443
          protocol: TCP
        resources:
          limits:
            cpu: '1'
            memory: '2Gi'
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      tolerations:
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
      volumes:
      - name: https-cert
        secret:
          defaultMode: 288
          secretName: console-https-secret
      - name: localtime
        hostPath:
          path: /etc/localtime
      - name: timezone
        hostPath:
          path: /etc/timezone