Allow optionally using a tag instead of a digest in deployment.yaml

This commit is contained in:
Ryan Richard 2020-07-09 10:16:46 -07:00
parent a9cf376000
commit 3fd7e7835a
2 changed files with 11 additions and 1 deletions

View File

@ -42,7 +42,11 @@ spec:
spec: spec:
containers: containers:
- name: placeholder-name - name: placeholder-name
#@ if data.values.image_digest:
image: #@ data.values.image_repo + "@" + data.values.image_digest image: #@ data.values.image_repo + "@" + data.values.image_digest
#@ else:
image: #@ data.values.image_repo + ":" + data.values.image_tag
#@ end
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: command:
- ./app - ./app

View File

@ -1,8 +1,14 @@
#@data/values #@data/values
--- ---
app_name: placeholder-name app_name: placeholder-name
namespace:
namespace: #! e.g. placeholder-name
#! Specify either an image_digest or an image_tag. If both are given, only image_digest will be used.
image_repo: #! e.g. gcr.io/your-project-name/repo-name image_repo: #! e.g. gcr.io/your-project-name/repo-name
image_digest: #! e.g. sha256:f3c4fdfd3ef865d4b97a1fd295d94acc3f0c654c46b6f27ffad5cf80216903c8 image_digest: #! e.g. sha256:f3c4fdfd3ef865d4b97a1fd295d94acc3f0c654c46b6f27ffad5cf80216903c8
image_tag: #! e.g. latest
webhook_url: #! e.g., https://example.com webhook_url: #! e.g., https://example.com
webhook_ca_bundle: #! e.g., "-----BEGIN CERTIFICATE----- [...]" webhook_ca_bundle: #! e.g., "-----BEGIN CERTIFICATE----- [...]"