apiVersion: apps/v1
kind: Deployment
metadata:
  name: opal-broadcast-channel-deployment
  namespace: hm-opa
spec:
  replicas: 1
  selector:
    matchLabels:
      component: opal-broadcast-channel
  template:
    metadata:
      labels:
        component: opal-broadcast-channel
    spec:
      containers:
        - name: opal-broadcast-channel
          image: postgres:13.3-alpine
          env:
            - name: POSTGRES_DB
              valueFrom:
                configMapKeyRef:
                  name: opal-broadcast-channel-configmap
                  key: postgres_db
            - name: POSTGRES_USER
              valueFrom:
                configMapKeyRef:
                  name: opal-broadcast-channel-configmap
                  key: postgres_user
            - name: POSTGRES_PASSWORD
              valueFrom:
                configMapKeyRef:
                  name: opal-broadcast-channel-configmap
                  key: postgres_password
          ports:
            - name: postgres
              protocol: TCP
              containerPort: 5432
