kind: Deployment
apiVersion: apps/v1
metadata:
  name: acm-agent
  namespace: open-cluster-management-agent
  labels:
    app: acm-agent
spec:
  replicas: 1
  selector:
    matchLabels:
      app: acm-agent
  template:
    metadata:
      labels:
        app: acm-agent
    spec:
      serviceAccountName: acm-agent-sa
      containers:
        - name: acm-agent
          image: ko://github.com/open-cluster-management/multicloud-operators-foundation/cmd/acm-agent
          imagePullPolicy: IfNotPresent
          args:
            - "/acm-agent"
            - "--hub-kubeconfig=/var/run/hub/kubeconfig"
            - "--cluster-name=cluster1"
            - "--port=4443"
            - "--agent-address=acm-agent.open-cluster-management-agent.svc"
            - "--agent-port=443"
            - "--insecure=true"
          volumeMounts:
            - name: hub-config
              mountPath: /var/run/hub
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8000
            failureThreshold: 3
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8000
            failureThreshold: 3
            periodSeconds: 10
      volumes:
        - name: hub-config
          secret:
            secretName: hub-kubeconfig-secret
