apiVersion: apps/v1
kind: Deployment
metadata:
  name: serviceb
  namespace: ingress-example
spec:
  replicas: 1
  selector:
    matchLabels:
      app: serviceb
  template:
    metadata:
      labels:
        app: serviceb
        editor: vscode
    spec:
      containers:
      - name: serviceb
        image: janisis.azurecr.io/serviceb
        ports:
        - containerPort: 3000
          name: api
        env:
          - name: HOST
            value: 0.0.0.0
          - name: PORT
            value: "3000"
          - name:  PG_HOST
            valueFrom:
              secretKeyRef:
                name:  mysecret
                key:  PG_HOST
          - name:  PG_USER
            valueFrom:
              secretKeyRef:
                name:  mysecret
                key:  PG_USER
          - name:  PG_PASSWORD
            valueFrom:
              secretKeyRef:
                name:  mysecret
                key:  PG_PASSWORD
          - name:  PG_DATABASE
            valueFrom:
              secretKeyRef:
                name:  mysecret
                key:  PG_DATABASE