Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vfarcic committed Dec 5, 2020
1 parent a8d55c4 commit e3cd8e6
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 4 deletions.
59 changes: 59 additions & 0 deletions k8s-debug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---

apiVersion: v1
kind: Pod
metadata:
name: kaniko
spec:
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:debug
command: ["sleep", "10000000"]
volumeMounts:
- name: kaniko-secret
mountPath: /kaniko/.docker
- name: dockerfile-storage
mountPath: /workspace
restartPolicy: Never
volumes:
- name: kaniko-secret
secret:
secretName: regcred
items:
- key: .dockerconfigjson
path: config.json
- name: dockerfile-storage
persistentVolumeClaim:
claimName: dockerfile-claim

---

apiVersion: v1
kind: PersistentVolume
metadata:
name: dockerfile
labels:
type: local
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
storageClassName: local-storage
hostPath:
path: /home/docker/kaniko-demo

---

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: dockerfile-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
storageClassName: local-storage

8 changes: 4 additions & 4 deletions k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ spec:
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:latest
args: ["--dockerfile=/workspace/dockerfile",
args: ["--dockerfile=/workspace/Dockerfile",
"--context=dir://workspace",
"--destination=<user-name>/<repo>"] # replace with your dockerhub account
"--destination=vfarcic/devops-toolkit:1.0.0"]
volumeMounts:
- name: kaniko-secret
mountPath: /kaniko/.docker
Expand Down Expand Up @@ -41,9 +41,9 @@ spec:
storage: 10Gi
accessModes:
- ReadWriteOnce
# storageClassName: local-storage
storageClassName: local-storage
hostPath:
path: /src
path: /home/docker/kaniko-demo

---

Expand Down

0 comments on commit e3cd8e6

Please sign in to comment.