-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(fluentd): add image reference by digest #362
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Michael McLeroy <[email protected]>
Signed-off-by: Michael McLeroy <[email protected]>
Signed-off-by: Michael McLeroy <[email protected]>
ece9c3b
to
ca82496
Compare
@@ -10,7 +10,16 @@ kind: "DaemonSet" | |||
image: | |||
repository: "fluent/fluentd-kubernetes-daemonset" | |||
pullPolicy: "IfNotPresent" | |||
tag: "" | |||
tag: "" # Set to "-" to not use the default value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I just tested and everything works fine.
Just drop the comment in front of tag which is not required...
helm template fluentd . -n kube-system -s templates/daemonset.yaml --set image.repository=myrepo/myimage --set image.tag=1.1.1 --set image.digest=sha256:4a1c4b21597c1b4415bdbecb28a3296c6b5e23ca4f9feeb599860a1dac6a0108
@@ -2,7 +2,7 @@ apiVersion: v2 | |||
name: fluentd | |||
description: A Helm chart for Kubernetes | |||
# type: application | |||
version: 0.4.3 | |||
version: 0.4.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update this
Fluentd image with tag/digest | ||
*/}} | ||
{{- define "fluentd.image" -}} | ||
{{- $tag := ternary "" (printf ":%s" (toString .tag)) (or (empty .tag) (eq "-" (toString .tag))) -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tags and hashes can coexist, where hash will always takes precedence over the tag, even if they dont match.
With this info you should be able to simplify this. Although it works as it is...
Thank you for your contribution @Boojapho |
Related to #356
Adds ability to reference images by digest. Digest will override tag.
Also fixed fluentd test.
Closes: #440