apiVersion: apps/v1
kind: Deployment
metadata:
  name: "{{{ COMPOSITE_CONTROLLER_NAME }}}"
  annotations:
    downscaler/exclude: "true"
spec:
  replicas: 1
  selector:
    matchLabels:
      application: "{{{ COMPOSITE_CONTROLLER_NAME }}}"
  template:
    metadata:
      labels:
        application: "{{{ COMPOSITE_CONTROLLER_NAME }}}"
    spec:
      containers:
        - name: "{{{ COMPOSITE_CONTROLLER_NAME }}}"
          image: "{{{IMAGE}}}:{{{VERSION}}}"
          env:
          - name: LOG_LEVEL
            value: INFO
          - name: WEBHOOK_TLS_ENABLED
            value: "TRUE"
          - name: WEBHOOK_TLS_UNSAFE_KEYSTORE_ENABLED
            value: "TRUE"
          - name: VERSIONED_HOSTS_ENABLED
            value: "TRUE"
          - name: VERSIONED_HOSTS_BASE_DOMAIN
            value: "{{{ VERSIONED_HOSTS_BASE_DOMAIN }}}"
          - name: ANNOTATION_ALLOWLIST
            value: "{{{ ANNOTATION_ALLOWLIST }}}"
          - name: ADDITIONAL_FILTER_ALLOWLIST
            value: "{{{ ADDITIONAL_FILTER_ALLOWLIST }}}"
          ports:
            - containerPort: 8080
            - containerPort: 8443
          readinessProbe:
            httpGet:
              path: /health
              port: 8080
          resources:
            requests:
              cpu: 1
              memory: 1024Mi
            limits:
              memory: 1024Mi