apiVersion: v1
kind: Pod
metadata:
  name: kaniko
spec:
  containers:
  - args:
    - --dockerfile=/docker_file_path
    - --destination=< Upload loaction for build image >
    - --context=/docker_context_path
    image: gcr.io/kaniko-project/executor:v0.22.0
    name: kaniko
    env:
      - name: BUILDNAME
        value: 'BUILDNAME'
      - name: ACCESSTOKEN
        value: 'ACCESS_TOKEN'
      - name: NAMESPACE
        value: 'NAMESPACE'
      - name: PUBGRADE_URL
        value: 'PUBGRADE_URL'
      - name: PUBGRADE_PORT
        value: 'PUBGRADE_PORT'
    volumeMounts:
    - mountPath: /pubgrade_temp_files
      name: pv-storage
    - mountPath: /kaniko/.docker/config.json
      name: pv-storage
      subPath: config.json
  restartPolicy: Never
  volumes:
  - name: pv-storage
    persistentVolumeClaim:
      claimName: task-pv-claim
