kind: Deployment
apiVersion: apps/v1
metadata:
  name: spoke-agent
  labels:
    app: spoke-agent
spec:
  replicas: 1
  selector:
    matchLabels:
      app: spoke-agent
  template:
    metadata:
      labels:
        app: spoke-agent
    spec:
      serviceAccountName: spoke-agent-sa
      containers:
      - name: spoke-agent
        image: quay.io/open-cluster-management/registration:latest
        imagePullPolicy: IfNotPresent
        args:
          - "/registration"
          - "agent"
          - "--cluster-name=cluster1"
          - "--bootstrap-kubeconfig=/spoke/bootstrap/kubeconfig"
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
              - ALL
          privileged: false
          runAsNonRoot: true
        volumeMounts:
        - name: bootstrap-secret
          mountPath: "/spoke/bootstrap"
          readOnly: true
        - name: hub-kubeconfig
          mountPath: "/spoke/hub-kubeconfig"
      volumes:
      - name: bootstrap-secret
        secret:
          secretName: bootstrap-secret
      - name: hub-kubeconfig
        emptyDir:
          medium: Memory
