-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I added a v1alpha3 version of the skaffold config, since adding different buildcontexts to the kaniko builder requires a breaking config change. Now, new buildcontexts can be easily added to the KanikoBuildContext type. I also added a transform function so that 'skaffold fix' can convert v1alpha2 configs to v1alpha3, and fixed unit tests to pass with the new config. This is part 1 of 3 PRs to incorporate more kaniko buildcontexts into the kaniko builder.
- Loading branch information
Priya Wadhwa
committed
Sep 13, 2018
1 parent
abe8032
commit e69338b
Showing
57 changed files
with
978 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: skaffold/v1alpha2 | ||
apiVersion: skaffold/v1alpha3 | ||
kind: Config | ||
build: | ||
artifacts: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: skaffold/v1alpha2 | ||
apiVersion: skaffold/v1alpha3 | ||
kind: Config | ||
build: | ||
artifacts: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: skaffold/v1alpha2 | ||
apiVersion: skaffold/v1alpha3 | ||
kind: Config | ||
build: | ||
tagPolicy: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: kaniko | ||
spec: | ||
initContainers: | ||
- name: init-container | ||
image: ubuntu | ||
args: ["sh", "-c", "cp -L -r /kaniko/buildcontext/* /kaniko/emptydir && ls /kaniko/emptydir && stat /kaniko/emptydir/Dockerfile"] | ||
volumeMounts: | ||
- name: build-context | ||
mountPath: /kaniko/buildcontext | ||
- name: empty-dir | ||
mountPath: /kaniko/emptydir | ||
containers: | ||
- name: kaniko | ||
image: gcr.io/kaniko-project/executor:latest | ||
args: ["--dockerfile=Dockerfile", | ||
"--context=dir:///kaniko/emptydir", | ||
"--destination=gcr.io/priya-wadhwa/test:test"] | ||
volumeMounts: | ||
- name: kaniko-secret | ||
mountPath: /secret | ||
- name: build-context | ||
mountPath: /kaniko/buildcontext | ||
- name: empty-dir | ||
mountPath: /kaniko/emptydir | ||
env: | ||
- name: GOOGLE_APPLICATION_CREDENTIALS | ||
value: /secret/kaniko-secret.json | ||
restartPolicy: Never | ||
volumes: | ||
- name: kaniko-secret | ||
secret: | ||
secretName: kaniko | ||
# - name: build-context | ||
# persistentVolumeClaim: | ||
# claimName: pv-claim-kaniko | ||
- name: build-context | ||
configMap: | ||
# Provide the name of the ConfigMap containing the files you want | ||
# to add to the container | ||
name: kaniko-configmap77a0c64f84c48aeb56093119c709807b | ||
- name: empty-dir | ||
emptyDir: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: skaffold/v1alpha2 | ||
apiVersion: skaffold/v1alpha3 | ||
kind: Config | ||
deploy: | ||
kustomize: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: skaffold/v1alpha2 | ||
apiVersion: skaffold/v1alpha3 | ||
kind: Config | ||
build: | ||
artifacts: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: skaffold/v1alpha2 | ||
apiVersion: skaffold/v1alpha3 | ||
kind: Config | ||
build: | ||
artifacts: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.