kind: ServiceAccount
apiVersion: v1
metadata:
  name: acorn-system
  namespace: acorn-system

---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: acorn-controller
  namespace: acorn-system
spec:
  replicas: 1
  selector:
    matchLabels:
      app: acorn-controller
  template:
    metadata:
      labels:
        app: acorn-controller
    spec:
      containers:
        - name: acorn-controller
          image: ghcr.io/acorn-io/runtime
          env:
            - name: LEGO_DISABLE_CNAME_SUPPORT
              value: "true"
          args:
            - controller
          securityContext:
            runAsUser: 1000
          readinessProbe:
            httpGet:
              path: /healthz
              port: 8888
          resources:
            requests:
              cpu: 100m
              memory: 256Mi
      priorityClassName: system-cluster-critical
      serviceAccountName: acorn-system
      tolerations:
        - key: node-role.kubernetes.io/control-plane
          operator: "Exists"
---
kind: PodDisruptionBudget
apiVersion: policy/v1
metadata:
  name: acorn-controller
  namespace: acorn-system
spec:
  maxUnavailable: 25%
  selector:
    matchLabels:
      app: acorn-controller
