kind: Deployment
apiVersion: apps/v1
metadata:
  name: ocm-proxyserver
  namespace: open-cluster-management
  labels:
    app: ocm-proxyserver
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ocm-proxyserver
  template:
    metadata:
      labels:
        app: ocm-proxyserver
    spec:
      serviceAccountName: foundation-hub-sa
      containers:
      - name: ocm-proxyserver
        image: ocm-proxyserver
        imagePullPolicy: IfNotPresent
        args:
          - "/proxyserver"
          - "--secure-port=6443"
          - "--tls-cert-file=/var/run/apiservice/tls.crt"
          - "--tls-private-key-file=/var/run/apiservice/tls.key"
          - "--agent-cafile=/var/run/klusterlet/ca.crt"
          - "--agent-certfile=/var/run/klusterlet/tls.crt"
          - "--agent-keyfile=/var/run/klusterlet/tls.key"
        volumeMounts:
        - mountPath: /var/run/klusterlet
          name: klusterlet-certs
        - mountPath: /var/run/apiservice
          name: apiservice-certs
        livenessProbe:
          httpGet:
            path: /healthz
            scheme: HTTPS
            port: 6443
          initialDelaySeconds: 2
          periodSeconds: 10
        readinessProbe:
          httpGet:
            path: /healthz
            scheme: HTTPS
            port: 6443
          initialDelaySeconds: 2
      volumes:
      - name: klusterlet-certs
        secret:
          defaultMode: 420
          secretName: ocm-klusterlet-self-signed-secrets
      - name: apiservice-certs
        secret:
          defaultMode: 420
          secretName: ocm-proxyserver
