apiVersion: apps/v1
kind: Deployment
metadata:
  name: "{{{APPLICATION}}}"
  annotations:
    downscaler/exclude: "true"
  labels:
    application: "{{{APPLICATION}}}"
    version: "{{{CDP_BUILD_VERSION}}}"
spec:
  replicas: 1
  selector:
    matchLabels:
      application: "{{{APPLICATION}}}"
  template:
    metadata:
      labels:
        application: "{{{APPLICATION}}}"
        version: "{{{CDP_BUILD_VERSION}}}"
    spec:
      serviceAccountName: stackset-controller
      containers:
      - name: "{{{APPLICATION}}}"
        image: "{{{IMAGE}}}"
        args:
          - "--controller-id={{{CONTROLLER_ID}}}"
          - "--cluster-domain={{{CLUSTER_DOMAIN}}}"
          - "--cluster-domain={{{CLUSTER_DOMAIN_INTERNAL}}}"
          - "--enable-routegroup-support"
          - "--ingress-source-switch-ttl=1m"
        resources:
          limits:
            cpu: 10m
            memory: 100Mi
          requests:
            cpu: 10m
            memory: 100Mi
        securityContext:
          runAsNonRoot: true
          runAsUser: 65534
          readOnlyRootFilesystem: true
          capabilities:
            drop: ["ALL"]
