apiVersion: apps/v1
kind: Deployment
metadata:
  name: hello-world-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      deployment: hello-world
  template:
    metadata:
      labels:
        deployment: hello-world
    spec:
      containers:
        - name: hello-world
          image: spantree/hello-world-kustomize-k8s:latest
          ports:
            - containerPort: 3000
          env:
            - name: GREETING
              valueFrom:
                configMapKeyRef:
                  name: hello-world-config
                  key: greeting
            - name: DATABASE_TYPE
              valueFrom:
                configMapKeyRef:
                  name: hello-world-config
                  key: dbtype
