---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: config-manager-server
spec:
  selector:
    matchLabels:
      name: config-manager-server
  template:
    metadata:
      labels:
        name: config-manager-server
    spec:
      containers:
      - name: config-manager-server
        image: gcr.io/pixie-oss/pixie-dev/cloud/config_manager_server_image
        ports:
        - containerPort: 50500
          name: http2
        - containerPort: 50501
          name: metrics-http
        readinessProbe:
          httpGet:
            scheme: HTTPS
            path: /healthz
            port: 50500
        livenessProbe:
          httpGet:
            scheme: HTTPS
            path: /healthz
            port: 50500
        envFrom:
        - configMapRef:
            name: pl-tls-config
        - configMapRef:
            name: pl-domain-config
        env:
        - name: PL_JWT_SIGNING_KEY
          valueFrom:
            secretKeyRef:
              name: cloud-auth-secrets
              key: jwt-signing-key
        - name: PL_ARTIFACT_TRACKER_SERVICE
          valueFrom:
            configMapKeyRef:
              name: pl-service-config
              key: PL_ARTIFACT_TRACKER_SERVICE
        - name: PL_PROD_SENTRY
          valueFrom:
            configMapKeyRef:
              name: pl-sentry-dsn-config
              key: PL_PROD_SENTRY
        - name: PL_DEV_SENTRY
          valueFrom:
            configMapKeyRef:
              name: pl-sentry-dsn-config
              key: PL_DEV_SENTRY
        volumeMounts:
        - name: certs
          mountPath: /certs
      volumes:
      - name: certs
        secret:
          secretName: service-tls-certs
