apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller-manager
  namespace: system
  labels:
    control-plane: controller-manager
spec:
  selector:
    matchLabels:
      control-plane: controller-manager
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: controller-manager
    spec:
      serviceAccountName: sa
      containers:
      - name: manager
        image: manager
        env:
          - name: BULWARD_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
        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
