kind: Deployment
apiVersion: apps/v1
metadata:
  name: work-agent
  labels:
    app: work-agent
spec:
  replicas: 1
  selector:
    matchLabels:
      app: work-agent
  template:
    metadata:
      labels:
        app: work-agent
    spec:
      serviceAccountName: work-agent-sa
      containers:
      - name: work-agent
        image: quay.io/open-cluster-management/work:latest
        imagePullPolicy: IfNotPresent
        args:
          - "/work"
          - "agent"
          - "--spoke-cluster-name=cluster1"
          - "--hub-kubeconfig=/spoke/hub-kubeconfig/kubeconfig"
        volumeMounts:
        - name: hub-kubeconfig-secret
          mountPath: "/spoke/hub-kubeconfig"
          readOnly: true
      volumes:
      - name: hub-kubeconfig-secret
        secret:
          secretName: hub-kubeconfig-secret
