apiVersion: apps/v1
kind: Deployment
metadata:
  name: component1
  labels:
     app: component1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: component1
  template:
    metadata:
      labels:
        app: component1
    spec:
      containers:
      - name: component1
        image: k8s.gcr.io/busybox
        env:
        - name: APP_USER
          value: $(ConfigMap.global.data.user)
        command: [ "/bin/sh", "-c", "cat /etc/config/component1 && sleep 60" ]
        volumeMounts:
        - name: config-volume
          mountPath: /etc/config
      volumes:
      - name: config-volume
        configMap:
          name: global
          items:
          - key: settings
            path: component1
