apiVersion: apps/v1
kind: Deployment
metadata:
  name: manager
  namespace: system
  labels:
    control-plane: manager
spec:
  selector:
    matchLabels:
      control-plane: manager
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: manager
    spec:
      serviceAccountName: sa
      containers:
      - image: quay.io/kubecarrier/catapult:latest
        name: manager
        args:
        - "--cert-dir=$(CERT_DIR)"
        - "-v=$(LOG_LEVEL)"
        env:
        - name: KUBERNETES_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: CERT_DIR
          value: "/tmp/k8s-webhook-server/serving-certs"
        resources:
          limits:
            cpu: 100m
            memory: 30Mi
          requests:
            cpu: 100m
            memory: 20Mi
        ports:
          - name: readiness-port
            containerPort: 9440
            protocol: TCP
        readinessProbe:
          httpGet:
            path: /readyz
            port: readiness-port
        livenessProbe:
          httpGet:
            path: /healthz
            port: readiness-port
      terminationGracePeriodSeconds: 10
