apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: enmasse
    component: service-broker
  name: service-broker
spec:
  replicas: 1
  selector:
    matchLabels:
      app: enmasse
      component: service-broker
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: enmasse
        component: service-broker
    spec:
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 1
              preference:
                matchExpressions:
                  - key: node-role.enmasse.io/operator-infra
                    operator: In
                    values:
                      - "true"
      containers:
      - env:
        - name: ENABLE_RBAC
          value: "false"
        - name: STANDARD_AUTHSERVICE_CONFIG_NAME
          value: keycloak-config
        - name: STANDARD_AUTHSERVICE_CREDENTIALS_SECRET_NAME
          value: keycloak-credentials
        - name: STANDARD_AUTHSERVICE_CERT_SECRET_NAME
          value: standard-authservice-cert
        - name: SERVICE_CATALOG_CREDENTIALS_SECRET_NAME
          value: service-catalog-credentials
        - name: CONSOLE_ROUTE_NAME
          value: console
        - name: CERT_DIR
          value: /service-broker-cert
        - name: LISTEN_PORT
          value: '8443'
        image: ${SERVICE_BROKER_IMAGE}
        imagePullPolicy: ${IMAGE_PULL_POLICY}
        livenessProbe:
          httpGet:
            path: /healthz
            port: https
            scheme: HTTPS
        name: service-broker
        ports:
        - containerPort: 8443
          name: https
        resources:
          limits:
            memory: 512Mi
          requests:
            memory: 512Mi
        volumeMounts:
        - mountPath: /service-broker-cert
          name: service-broker-cert
          readOnly: true
      serviceAccountName: service-broker
      volumes:
      - name: service-broker-cert
        secret:
          secretName: service-broker-cert
