# Copyright Contributors to the Open Cluster Management project

kind: Deployment
apiVersion: apps/v1
metadata:
  name: clusterlifecycle-state-metrics
  namespace: open-cluster-management
spec:
  replicas: 2
  selector:
    matchLabels:
      app: clusterlifecycle-state-metrics
  template:
    metadata:
      labels:
        app: clusterlifecycle-state-metrics
    spec:
      serviceAccountName: clusterlifecycle-state-metrics
      containers:
      - name: clusterlifecycle-state-metrics
        imagePullPolicy: IfNotPresent
        args:
          - "--http-port=8080"
          - "--http-telemetry-port=8081"
          - "--https-port=8443"
          - "--https-telemetry-port=8444"
          - "--tls-crt-file=/var/run/clusterlifecycle-state-metrics/tls.crt"
          - "--tls-key-file=/var/run/clusterlifecycle-state-metrics/tls.key"
        env:
          - name: POD_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
        readinessProbe:
          httpGet:
            path: /healthz
            port: 8081
          initialDelaySeconds: 15
          periodSeconds: 5
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8081
          initialDelaySeconds: 15
          periodSeconds: 5
        volumeMounts:
          - mountPath: "/var/run/clusterlifecycle-state-metrics"
            name: certs
            readOnly: true
      imagePullSecrets:
      - name: multiclusterhub-operator-pull-secret
      volumes:
        - name: certs
          secret:
            secretName: clusterlifecycle-state-metrics