kind: Deployment
apiVersion: apps/v1
metadata:
  name: work-agent
  namespace: open-cluster-management-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: champly/work:v0.0.1
        imagePullPolicy: Always
        args:
          - "/work"
          - "agent"
          - "--spoke-cluster-name=cluster1"
          - "--hub-kubeconfig=/spoke/hub-kubeconfig/kubeconfig"
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
              - ALL
          privileged: false
          runAsNonRoot: true
        volumeMounts:
        - name: hub-kubeconfig-secret
          mountPath: "/spoke/hub-kubeconfig"
          readOnly: true
      volumes:
      - name: hub-kubeconfig-secret
        secret:
          secretName: hub-kubeconfig-secret
