apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller
  namespace: system
  labels:
    control-plane: controller
spec:
  selector:
    matchLabels:
      control-plane: controller
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: controller
        sidecar.istio.io/proxyCPU: "10m"
        sidecar.istio.io/proxyMemory: "50m"
    spec:
      imagePullSecrets:
        - name: docker-registry-secret
      containers:
        - command:
            - /manager
          args:
            - --enable-leader-election
          image: controller:latest
          imagePullPolicy: Always
          name: manager
          env:
            - name: ENABLE_WEBHOOKS
              value: "true"
          resources:
            limits:
              cpu: 100m
              memory: 256Mi
            requests:
              cpu: 10m
              memory: 128Mi
      terminationGracePeriodSeconds: 10
