apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller-manager
  labels:
    control-plane: controller-manager
spec:
  selector:
    matchLabels:
      control-plane: controller-manager
  template:
    metadata:
      labels:
        control-plane: controller-manager
    spec:
      containers:
      - command:
        - /manager
        args:
        - --enable-leader-election
        image: goharbor/harbor-operator:dev
        name: manager
        resources:
          limits:
            cpu: 500m
            memory: 300Mi
          requests:
            cpu: 300m
            memory: 200Mi
        ports:
        - name: ready
          containerPort: 5000
          protocol: TCP
        livenessProbe:
          httpGet:
            path: /healthz
            port: ready
        readinessProbe:
          httpGet:
            path: /readyz
            port: ready
        env:
        - name: NAMESPACE
          valueFrom:
            fieldRef:
                fieldPath: metadata.namespace

      terminationGracePeriodSeconds: 10
