apiVersion: v1
kind: Pod
metadata:
  namespace: default
  generateName: cmstore-example-
spec:
  initContainers:
  - name: init-cmstore
    image: cmstore
    imagePullPolicy: Never
    command: ["cmstore", "init", "--namespace", "default", "--name", "configmap1", "--dir", "/config", "--create-if-not-found"]
    volumeMounts:
    - name: config
      mountPath: /config
  containers:
  - name: main
    image: ubuntu:20.04
    command: ["sleep", "infinity"]
    volumeMounts:
    - name: config
      mountPath: /config
  - name: cmstore
    image: cmstore
    imagePullPolicy: Never
    command: ["cmstore", "watch", "--namespace", "default", "--name", "configmap1", "--dir", "/config"]
    volumeMounts:
    - name: config
      mountPath: /config
  volumes:
  - name: config
    emptyDir: {}
