Digest pinning support for Trivy image. - #2370
Open
Vinnie161 wants to merge 1 commit into
Open
Conversation
Signed-off-by: Vitaliy P <vpr@lido.fi>
Vinnie161
force-pushed
the
feature/digest-pinning-support-for-trivy
branch
from
May 12, 2026 13:44
539079b to
f2ce44f
Compare
Collaborator
|
Let's discuss more in this thread |
There was a problem hiding this comment.
Pull request overview
Adds optional digest pinning for the Harbor Trivy adapter image so chart users can render immutable repository@digest references while keeping the existing repository:tag behavior by default.
Changes:
- Introduces
trivy.image.digest(optional) invalues.yaml, documented as taking precedence overtrivy.image.tag. - Updates the Trivy StatefulSet template to render
repository@digestwhen a digest is provided, otherwiserepository:tag.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| values.yaml | Adds the new trivy.image.digest value and inline documentation for digest-over-tag behavior. |
| templates/trivy/trivy-sts.yaml | Updates the Trivy container image reference rendering to support digest pinning. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+930
to
+933
| # The image digest to pull. | ||
| # If set, it takes precedence over the image tag. | ||
| # Example: sha256:... | ||
| digest: "" |
| containers: | ||
| - name: trivy | ||
| image: {{ .Values.trivy.image.repository }}:{{ .Values.trivy.image.tag }} | ||
| image: {{ .Values.trivy.image.repository }}{{- if .Values.trivy.image.digest }}@{{ .Values.trivy.image.digest }}{{- else }}:{{ .Values.trivy.image.tag }}{{- end }} |
Collaborator
|
Hi @Vinnie161 , Sorry for the late response. Would you like to continue working on this PR and add a UT and update README for this configuration? Thanks, |
Author
|
Hi, @MinerYang! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change adds optional digest support for the Harbor Trivy adapter image.
Currently the Trivy StatefulSet always renders the image as:
This makes it impossible to use digest-based image references such as:
The new
trivy.image.digestvalue is optional and backward compatible:trivy.image.digestis empty, the chart keeps rendering<repository>:<tag>trivy.image.digestis set, the chart renders<repository>@<digest>This allows users to pin the Trivy adapter image by immutable digest while preserving the existing tag-based behavior by default.