Add fail-fast check when trying to use chart v1 with Dependency-Track v5#352
Merged
Conversation
The chart is not compatible with DT v5. The v5-compatible chart will bump a major version. This is just a safety mechanism to prevent accidental breakage of deployments when users blindly bump the DT version. Note that this does not and can not catch cases where v5 images are referenced by sha256 digest. Signed-off-by: nscuro <nscuro@protonmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds a fail-fast guard in the Dependency-Track Helm chart to prevent users from deploying Dependency-Track v5 images with the current chart major version, reducing the risk of accidental production breakage when bumping image tags.
Changes:
- Add template-time
failchecks that blockapiServer.image.tagandfrontend.image.tagwhen the tag appears to reference Dependency-Track v5 (excluding sha256 digests). - Refactor image tag handling to consistently default to
.Chart.AppVersionvia a local$tagvariable. - Bump the chart version from
1.0.0to1.1.0.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
charts/dependency-track/templates/_helpers.tpl |
Adds v5 tag detection + template fail guards for api-server and frontend image tags. |
charts/dependency-track/Chart.yaml |
Increments chart version to reflect the added fail-fast behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The chart is not compatible with DT v5. The v5-compatible chart will bump a major version. This is just a safety mechanism to prevent accidental breakage of deployments when users blindly bump the DT version.
Note that this does not and can not catch cases where v5 images are referenced by sha256 digest.