apiVersion: apps/v1
kind: Deployment
metadata:
  name: node
  namespace: ${NAMESPACE}
  labels:
    name: node
spec:
  replicas: 1
  selector:
    matchLabels:
      app: node
  template:
    metadata:
      labels:
        app: node
    spec:
      containers:
        - name: node
          image: nodeapp:1.0 # update
          imagePullPolicy: Never
          env:
            - name: NODE_ENV
              value: ${ENV}
            - name: PORT
              value: "3000"
            - name: POSTGRES_USER
              valueFrom:
                secretKeyRef:
                  name: postgres-credentials
                  key: user
            - name: POSTGRES_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: postgres-credentials
                  key: password