apiVersion: apps/v1
kind: Deployment
metadata:
  name: hub-of-hubs-agent
  namespace: open-cluster-management
spec:
  replicas: 1
  selector:
    matchLabels:
      name: hub-of-hubs-agent
  template:
    metadata:
      labels:
        name: hub-of-hubs-agent
    spec:
      serviceAccountName: hub-of-hubs-agent
      containers:
        - name: hub-of-hubs-agent
          image: quay.io/open-cluster-management-hub-of-hubs/hub-of-hubs-agent:latest
          args:
            - '--zap-devel=true'
            - --pod-namespace=$(POD_NAMESPACE)
            - --leaf-hub-name={{ .LeadHubID }}
            - --enforce-hoh-rbac={{ .EnableHoHRBAC }}
            - --transport-type={{ .TransportType}}
            - --kafka-bootstrap-server={{ .KafkaBootstrapServer }}
            - --kafka-ssl-ca={{ .KafkaCA }}
          imagePullPolicy: Always
          env:
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                 apiVersion: v1
                 fieldPath: metadata.namespace
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                 apiVersion: v1
                 fieldPath: metadata.namespace
