apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: liqo-dashboard
  name: liqo-dashboard
  namespace: liqo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: liqo-dashboard
  template:
    metadata:
      labels:
        app: liqo-dashboard
    spec:
      containers:
        - image: liqo/dashboard:latest
          imagePullPolicy: Always
          name: liqo-dashboard
          ports:
            - containerPort: 80
              name: http
              protocol: TCP
          env:
            - name: OIDC_PROVIDER_URL
              valueFrom:
                configMapKeyRef:
                  name: liqo-dashboard-env-vars
                  key: oidc_provider_url
            - name: OIDC_CLIENT_ID
              valueFrom:
                configMapKeyRef:
                  name: liqo-dashboard-env-vars
                  key: oidc_client_id
            - name: OIDC_CLIENT_SECRET
              valueFrom:
                configMapKeyRef:
                  name: liqo-dashboard-env-vars
                  key: oidc_client_secret
            - name: OIDC_REDIRECT_URI
              valueFrom:
                configMapKeyRef:
                  name: liqo-dashboard-env-vars
                  key: oidc_redirect_uri
            - name: APISERVER_URL
              valueFrom:
                configMapKeyRef:
                  name: liqo-dashboard-env-vars
                  key: apiserver_url  