apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller-k8s
  labels:
    app.kubernetes.io/component: controller
spec:
  selector:
    matchLabels:
      app.kubernetes.io/component: controller
  replicas: 1
  template:
    metadata:
      annotations:
        kubectl.kubernetes.io/default-container: controller
      labels:
        app.kubernetes.io/component: controller
    spec:
      containers:
        - image: controller:latest
          args:
            - --enable-configmap-check=false
          name: controller
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - "ALL"
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8081
            initialDelaySeconds: 15
            periodSeconds: 20
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8081
            initialDelaySeconds: 5
            periodSeconds: 10
      serviceAccountName: controller-k8s
      terminationGracePeriodSeconds: 10