apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: enmasse
  name: keycloak-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: enmasse
      name: keycloak-controller
  template:
    metadata:
      labels:
        app: enmasse
        name: keycloak-controller
    spec:
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 1
              preference:
                matchExpressions:
                  - key: node-role.enmasse.io/operator-infra
                    operator: In
                    values:
                      - "true"
      containers:
      - env:
        - name: AUTO_CREATE
          value: "true"
        - name: KEYCLOAK_ROUTE_NAME
          value: "keycloak"
        - name: KEYCLOAK_CONFIG_NAME
          value: "keycloak-config"
        - name: KEYCLOAK_CREDENTIALS_SECRET_NAME
          value: "keycloak-credentials"
        - name: KEYCLOAK_CERT_SECRET_NAME
          value: "standard-authservice-cert"
        image: amq7/amq-online-1-auth-controller:dev
        imagePullPolicy: Always
        name: keycloak-controller
        resources:
          limits:
            memory: 256Mi
          requests:
            memory: 256Mi
      serviceAccountName: keycloak-controller
