Skip to content

Instantly share code, notes, and snippets.

@aaron-prindle
Created January 30, 2024 15:41
Show Gist options
  • Save aaron-prindle/abecd71ff3ecc30d85e68a42d754045b to your computer and use it in GitHub Desktop.
Save aaron-prindle/abecd71ff3ecc30d85e68a42d754045b to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: kaniko-root-go-ethereum-v2
namespace: wi
labels:
kaniko-test-category: root
spec:
serviceAccountName: <SA>
nodeSelector:
iam.gke.io/gke-metadata-server-enabled: "true"
initContainers:
- name: prepare
image: alpine/git
args:
- clone
- --single-branch
- --
- https://github.com/ethereum/go-ethereum.git
- /gitcontext
volumeMounts:
- name: gitcontext
mountPath: /gitcontext
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:latest
args:
- "--dockerfile=./Dockerfile"
- "--context=/gitcontext"
- "--destination=gcr.io/<repo>/<image-name>:latest"
- "--no-push"
- "--skip-push-permission-check"
- "--snapshot-mode=redo"
- "--kaniko-dir=/scratch"
resources:
requests:
cpu: 500m
memory: 2Gi
ephemeral-storage: 100Gi
volumeMounts:
- mountPath: "/scratch"
name: scratch-volume
- name: gitcontext
mountPath: /gitcontext
volumes:
- name: gitcontext
emptyDir: {}
- name: scratch-volume
ephemeral:
volumeClaimTemplate:
metadata:
labels:
type: scratch-volume
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "ssd"
resources:
requests:
storage: 1Ti
restartPolicy: Never
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment