apiVersion: v1
kind: Pod
metadata:
  name: tarball
spec:
  containers:
    - name: tarball
      image: busybox
      command: ["sh"]
      args:
        - "-c"
        - |
          tar ztf /tarball/tarball.tar.gz
          tar zxf /tarball/tarball.tar.gz -C /workspace
      volumeMounts:
        - name: tarball
          mountPath: /tarball/tarball.tar.gz
          subPath: tarball.tar.gz
        - name: workspace
          mountPath: /workspace
      terminationMessagePolicy: "FallbackToLogsOnError"
  restartPolicy: Never
  volumes:
    - name: tarball
      configMap:
        name: tarball
    - name: workspace
      persistentVolumeClaim:
        claimName: tarball
