forked from shipwright-io/build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildstrategy_kaniko_cr.yaml
61 lines (61 loc) · 1.47 KB
/
buildstrategy_kaniko_cr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
apiVersion: shipwright.io/v1beta1
kind: ClusterBuildStrategy
metadata:
name: kaniko
spec:
steps:
- name: build-and-push
image: gcr.io/kaniko-project/executor:v1.23.2
workingDir: $(params.shp-source-root)
securityContext:
capabilities:
add:
- CHOWN
- DAC_OVERRIDE
- FOWNER
- SETGID
- SETUID
- SETFCAP
- KILL
env:
- name: HOME
value: /tekton/home
- name: DOCKER_CONFIG
value: /tekton/home/.docker
- name: AWS_ACCESS_KEY_ID
value: NOT_SET
- name: AWS_SECRET_KEY
value: NOT_SET
command:
- /kaniko/executor
args:
- --dockerfile
- $(params.dockerfile)
- --context
- $(params.shp-source-context)
- --destination
- $(params.shp-output-image)
- --snapshot-mode
- redo
- --no-push
- --tar-path
- $(params.shp-output-directory)/image.tar
# https://github.com/GoogleContainerTools/kaniko/issues/2164
- --ignore-path
- /product_uuid
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 250m
memory: 65Mi
parameters:
- name: dockerfile
description: The path to the Dockerfile to be used for building the image.
type: string
default: "Dockerfile"
securityContext:
runAsUser: 0
runAsGroup: 0