apiVersion: apps/v1
kind: Deployment
metadata:
  name: operator
  namespace: system
spec:
  selector:
    matchLabels:
      control-plane: controller-manager
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: controller-manager
    spec:
      securityContext:
        runAsUser: 65532
      containers:
      - name: operator
        image: quay.io/vshn/espejo:latest
        args:
        - --enable-leader-election
        resources:
          limits:
            cpu: 300m
            memory: 100Mi
          requests:
            cpu: 20m
            memory: 50Mi
        env:
        - name: WATCH_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
      terminationGracePeriodSeconds: 10
