File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -131,25 +131,27 @@ function customize-image-in-env {
131
131
local NEW=" ${2} "
132
132
local TAG=" ${NEW##*: } "
133
133
local IMG=" ${NEW%:* } "
134
+ local FN_CONFIG=" ${PORCH_DIR} /.build/set-image-config.yaml"
134
135
135
- cat > set-image-config.yaml << EOF
136
+ cat > " ${FN_CONFIG} " << EOF
136
137
apiVersion: fn.kpt.dev/v1alpha1
137
138
kind: SetImage
138
139
metadata:
139
140
name: my-func-config
140
141
image:
141
142
name: ${OLD}
142
143
newName: ${IMG}
143
- newTag: " ${TAG} "
144
+ newTag: ${TAG}
144
145
additionalImageFields:
145
146
- group: apps
146
147
version: v1
147
148
kind: Deployment
148
149
path: spec/template/spec/containers[]/env[]/value
149
150
EOF
150
151
151
- kpt fn eval " ${DESTINATION} " --image set-image:v0.1.0 --fn-config set-image-config.yaml
152
- rm set-image-config.yaml
152
+ trap " rm -f ${FN_CONFIG} " EXIT
153
+
154
+ kpt fn eval " ${DESTINATION} " --image set-image:v0.1.0 --fn-config " ${FN_CONFIG} " || echo " kpt fn eval failed"
153
155
}
154
156
155
157
function customize-sa {
You can’t perform that action at this time.
0 commit comments