apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: component2
  name: component2
spec:
  replicas: 1
  selector:
    matchLabels:
      app: component2
  template:
    metadata:
      labels:
        app: component2
    spec:
      containers:
      - command:
        - /bin/sh
        - -c
        - cat /etc/config/component2 && sleep 60
        env:
        - name: APP_USER
          value: myuser
        image: k8s.gcr.io/busybox
        name: component2
        volumeMounts:
        - mountPath: /etc/config
          name: config-volume
      volumes:
      - configMap:
          items:
          - key: settings
            path: component2
          name: global
        name: config-volume
