Skip to content

chore(must-gather): rename the must-gather chart to be consistent with the other chart names#360

Merged
rm3l merged 1 commit intoredhat-developer:mainfrom
rm3l:chore/rename_must-gather_chart
Apr 17, 2026
Merged

chore(must-gather): rename the must-gather chart to be consistent with the other chart names#360
rm3l merged 1 commit intoredhat-developer:mainfrom
rm3l:chore/rename_must-gather_chart

Conversation

@rm3l
Copy link
Copy Markdown
Member

@rm3l rm3l commented Apr 17, 2026

Description of the change

Rename into redhat-developer-hub-must-gather, in preparation for publication in the openshift-helm-charts repo.

Which issue(s) does this PR fix or relate to

Relates to https://redhat.atlassian.net/browse/RHIDP-12627

How to test changes / Special notes to the reviewer

Checklist

  • For each Chart updated, version bumped in the corresponding Chart.yaml according to Semantic Versioning.
  • For each Chart updated, variables are documented in the values.yaml and added to the corresponding README.md. The pre-commit utility can be used to generate the necessary content. Run pre-commit run --all-files to run the hooks and then push any resulting changes. The pre-commit Workflow will enforce this and warn you if needed.
  • JSON Schema template updated and re-generated the raw schema via the pre-commit hook.
  • Tests pass using the Chart Testing tool and the ct lint command.
  • If you updated the orchestrator-infra chart, make sure the versions of the Knative CRDs are aligned with the versions of the CRDs installed by the OpenShift Serverless operators declared in the values.yaml file. See Installing Knative Eventing and Knative Serving CRDs for more details.

@rm3l rm3l requested a review from a team as a code owner April 17, 2026 15:54
@openshift-ci openshift-ci Bot requested review from gazarenkov and zdrapela April 17, 2026 15:54
@rhdh-qodo-merge
Copy link
Copy Markdown

rhdh-qodo-merge Bot commented Apr 17, 2026

Code Review by Qodo

🐞 Bugs (2)   📘 Rule violations (0)   📎 Requirement gaps (1)
🐞\ ≡ Correctness (1) ☼ Reliability (1)
📎\ ⚙ Maintainability (1)

Grey Divider


Action required

1. Rename breaks upgrade names 🐞
Description
Changing Chart.yaml name changes .Chart.Name, but this chart uses .Chart.Name to compute
fullname and selector labels; upgrading an existing release will rename/recreate
Deployments/RBAC/ServiceAccounts and can break anything relying on the previous resource
names/labels. This turns a “rename the chart artifact” change into an operationally breaking
upgrade.
Code

charts/must-gather/Chart.yaml[7]

+name: redhat-developer-hub-must-gather
Relevance

⭐⭐⭐ High

Team previously flagged chart renames as upgrade-breaking; expects migration/compat story when
.Chart.Name affects resources.

PR-#162

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The PR changes the chart name, and the chart’s helpers use .Chart.Name to generate the fullname
and app.kubernetes.io/name labels, which are then used as metadata.name and selectors in
rendered resources; therefore the rename propagates to Kubernetes object identities during `helm
upgrade`.

charts/must-gather/Chart.yaml[6-9]
charts/must-gather/templates/_helpers.tpl[4-23]
charts/must-gather/templates/_helpers.tpl[48-51]
charts/must-gather/templates/deployment.yaml[3-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The chart rename updates `.Chart.Name`, and the current helpers derive Kubernetes resource names/selectors from `.Chart.Name`, causing resource identity changes on upgrade.

### Issue Context
The PR goal appears to be renaming the chart artifact; keeping Kubernetes resource names stable avoids breaking upgrades and integrations.

### Fix Focus Areas
- charts/must-gather/templates/_helpers.tpl[4-23]
- charts/must-gather/templates/_helpers.tpl[48-51]
- charts/must-gather/values.yaml[18-21]

### Suggested fix approach
- Introduce a stable internal base name for resources (e.g., hardcode `rhdh-must-gather` in the `name`/`fullname` helpers, or default `nameOverride` to `rhdh-must-gather`).
- If you intentionally want resource renames, document it prominently (README + release notes) and consider a versioning strategy that clearly signals a breaking change.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. appVersion set to latest 📎
Description
The chart metadata now uses a non-versioned appVersion (latest), which reduces release
traceability and can conflict with an onboarding/publishing process that expects deterministic,
version-aligned chart metadata. This may block or complicate aligning the must-gather chart with the
established OpenShift charts onboarding conventions.
Code

charts/must-gather/Chart.yaml[R13-14]

# Application version - matches the must-gather tool version
-appVersion: "0.2.0"
+appVersion: "latest"
Relevance

⭐⭐⭐ High

Reviewers required deterministic appVersion matching tool version; setting appVersion to "latest"
likely rejected.

PR-#326

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 2 requires following the orchestrator-infra chart onboarding approach and meeting
OpenShift charts repository conventions; setting appVersion to latest makes the chart metadata
non-deterministic and not clearly aligned to a specific released tool version. The changed line in
charts/must-gather/Chart.yaml shows appVersion: "latest".

Follow orchestrator-infra chart onboarding approach for the RHDH must-gather chart
charts/must-gather/Chart.yaml[13-14]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`charts/must-gather/Chart.yaml` sets `appVersion` to `latest`, which is non-deterministic and undermines traceability for onboarding/publishing flows that expect version-aligned chart metadata.

## Issue Context
The comment in the chart states the `appVersion` should match the must-gather tool version, but `latest` does not identify a specific released version.

## Fix Focus Areas
- charts/must-gather/Chart.yaml[13-14]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Helm test names too long 🐞
Description
The longer chart name increases fullname, and the test hook resources append -test after
fullname without re-truncating, which can produce invalid Kubernetes names (>63 chars) for
moderately long release names. This breaks helm test for such releases.
Code

charts/must-gather/Chart.yaml[7]

+name: redhat-developer-hub-must-gather
Relevance

⭐⭐⭐ High

Name length bug is plausible; team regularly fixes Helm test issues in must-gather chart templates.

PR-#326

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
fullname is truncated to 63 characters in the helper, but the test resources build names as
<fullname>-test, which can exceed the 63-character DNS label limit because the suffix is added
after truncation; the chart rename makes hitting this limit significantly more likely by increasing
.Chart.Name length.

charts/must-gather/templates/_helpers.tpl[13-23]
charts/must-gather/templates/tests/test.yaml[1-6]
charts/must-gather/templates/tests/test.yaml[15-22]
charts/must-gather/templates/tests/test.yaml[57-69]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
Helm test hook resource names are constructed by appending `-test` after a `fullname` that is already truncated, which can yield names longer than 63 characters.

### Issue Context
With the new chart name (`redhat-developer-hub-must-gather`), the computed `fullname` becomes longer, so more real-world release names will cause `helm test` hook resources to fail validation.

### Fix Focus Areas
- charts/must-gather/templates/tests/test.yaml[1-69]
- charts/must-gather/templates/_helpers.tpl[13-23]

### Suggested fix approach
- For each place using `{{ include "rhdh-must-gather.fullname" . }}-test`, change to something like:
 - `{{ printf "%s-test" (include "rhdh-must-gather.fullname" .) | trunc 63 | trimSuffix "-" }}`
- Apply the same pattern consistently for Role/RoleBinding/Pod/ServiceAccount names and references (roleRef, subjects, serviceAccountName).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@rm3l rm3l changed the title chore: rename the must-gather chart to be consistent with the other chart names chore(must-gather): rename the must-gather chart to be consistent with the other chart names Apr 17, 2026
@sonarqubecloud
Copy link
Copy Markdown

@rhdh-qodo-merge
Copy link
Copy Markdown

Review Summary by Qodo

Rename must-gather chart for naming consistency

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Rename chart from rhdh-must-gather to redhat-developer-hub-must-gather
• Update chart version from 0.3.0 to 0.4.0
• Change appVersion from "0.2.0" to "latest"
• Update documentation and examples with new chart name
Diagram
flowchart LR
  A["Chart.yaml<br/>rhdh-must-gather"] -- "rename to" --> B["redhat-developer-hub-must-gather"]
  A -- "version bump" --> C["0.4.0"]
  A -- "appVersion update" --> D["latest"]
  B --> E["README.md<br/>updated examples"]
  B --> F["README.md.gotmpl<br/>updated template"]
Loading

Grey Divider

File Changes

1. charts/must-gather/Chart.yaml ⚙️ Configuration changes +4/-4

Chart metadata rename and version bump

• Renamed chart name from rhdh-must-gather to redhat-developer-hub-must-gather
• Bumped chart version from 0.3.0 to 0.4.0
• Updated appVersion from "0.2.0" to "latest"
• Updated chart description from "deploying" to "running"

charts/must-gather/Chart.yaml


2. charts/must-gather/README.md 📝 Documentation +4/-4

Documentation updated with new chart name

• Updated version badge from 0.3.0 to 0.4.0
• Updated Helm installation command with new chart name
• Updated chart description from "deploying" to "running"
• Updated version reference in TL;DR example

charts/must-gather/README.md


3. charts/must-gather/README.md.gotmpl 📝 Documentation +1/-1

Template updated for chart name consistency

• Updated Helm installation command template with new chart name redhat-developer-hub-must-gather

charts/must-gather/README.md.gotmpl


Grey Divider

Qodo Logo

@rhdh-qodo-merge rhdh-qodo-merge Bot added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 17, 2026
@rm3l rm3l merged commit 6ccc700 into redhat-developer:main Apr 17, 2026
5 of 6 checks passed
@rm3l rm3l deleted the chore/rename_must-gather_chart branch April 17, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant