---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: quarkuscoffeeshop-counter
  labels:
    app: quarkuscoffeeshop-counter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: quarkuscoffeeshop-counter
  template:
    metadata:
      name: quarkuscoffeeshop-counter-deployment
      labels:
        app:  quarkuscoffeeshop-counter
        app.kubernetes.io/component: quarkuscoffeeshop-counter
        app.kubernetes.io/instance: quarkuscoffeeshop-counter
        app.kubernetes.io/part-of: quarkuscoffeeshop
        quarkuscoffeeshop: ""
        app.openshift.io/runtime-namespace: quarkuscoffeeshop-demo
    spec:
      containers:
        - name: quarkuscoffeeshop-counter
          image: quay.io/quarkuscoffeeshop/quarkuscoffeeshop-counter:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 8080
              protocol: TCP
          env:
            - name: KAFKA_BOOTSTRAP_URLS
              value: cafe-cluster-kafka-bootstrap:9092
            - name: PGSQL_URL
              value: 'jdbc:postgresql://coffeeshopdb:5432/coffeeshopdb?currentSchema=coffeeshop'
            - name: PGSQL_USER
              value: coffeshopadmin
            - name: PGSQL_PASS
              value: 'changepassword'
            - name: LOG_SQL
              value: 'true'
            - name: QUARKUS_LOG_LEVEL
              value: INFO
            - name: QUARKUSCOFFEESHOP_LOG_LEVEL
              value: DEBUG
