apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ app_name }}-clone
  namespace: "{{ app_ns }}"
  labels:
    app: clone-app-from-pvc
spec:
  selector:
    matchLabels:
      app: clone-app-from-pvc
  template:
    metadata:
      labels:
        app: clone-app-from-pvc
    spec:
      containers:
      - name: app-busybox
        imagePullPolicy: IfNotPresent
        image: gcr.io/google-containers/busybox
        command: ["/bin/sh"]
        args: ["-c", "while true; do sleep 10;done"]
        env:
        volumeMounts:
        - name: data-vol
          mountPath: /busybox
      volumes:
      - name: data-vol
        persistentVolumeClaim:
          claimName: "{{ clone_pvc_name }}"