apiVersion: apps/v1
kind: Deployment
metadata:
  name: portal-backend-deployment
spec:
  selector:
    matchLabels:
      app: portal-backend
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: portal-backend
    spec:
      containers:
        - image: robekeane/portal-backend:0.16
          name: portal-backend-con
          env:
            - name: ADDR
              valueFrom:
                configMapKeyRef:
                  name: backend-config
                  key: addr
            - name: DSN
              valueFrom:
                configMapKeyRef:
                  name: backend-config
                  key: dsn
            - name: MAX_IDLE_CONN
              valueFrom:
                configMapKeyRef:
                  name: backend-config
                  key: max_idle_conn
            - name: TOKEN
              valueFrom:
                configMapKeyRef:
                  name: backend-config
                  key: token