Propagate CATTLE_WRANGLER_CHECK_GVK_ERROR_MAPPING to fleet-agent#5085
Merged
0xavi0 merged 2 commits intoMay 8, 2026
Merged
Conversation
The controller now forwards the CATTLE_WRANGLER_CHECK_GVK_ERROR_MAPPING env variable to the agent deployment, following the same pattern used by EXPERIMENTAL_COPY_RESOURCES_DOWNSTREAM. The env var name is defined as a single exported constant (EnvVarWranglerCheckGVKErrorMapping) in internal/config, replacing the package-private copy that existed in the summary package. Refers to: rancher#5060 Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR propagates the CATTLE_WRANGLER_CHECK_GVK_ERROR_MAPPING environment variable from the controller to the downstream fleet-agent deployment so that Wrangler-based health summarization behaves consistently across management and downstream clusters (per issue #5060).
Changes:
- Added a shared exported constant
EnvVarWranglerCheckGVKErrorMappingininternal/configand updated summarizer code/tests to use it. - Updated the agent deployment manifest generation to inject
CATTLE_WRANGLER_CHECK_GVK_ERROR_MAPPINGinto the agent container, sourced from the controller’s own environment. - Added a controller-side manifest test verifying the env var is present and carries through the expected value.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/config/config.go | Introduces EnvVarWranglerCheckGVKErrorMapping constant to centralize the env var name. |
| internal/cmd/controller/agentmanagement/agent/manifest.go | Injects the Wrangler mapping env var into the generated fleet-agent Deployment manifest. |
| internal/cmd/controller/agentmanagement/agent/manifest_test.go | Adds tests to validate the new env var is present in the rendered agent manifest. |
| internal/cmd/agent/deployer/summary/summarizers.go | Switches summarizer initialization to read the env var via the new shared constant. |
| internal/cmd/agent/deployer/summary/summarizers_test.go | Updates tests to set the env var using the shared constant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
0xavi0
added a commit
that referenced
this pull request
May 8, 2026
…) (#5092) * Propagate CATTLE_WRANGLER_CHECK_GVK_ERROR_MAPPING to fleet-agent The controller now forwards the CATTLE_WRANGLER_CHECK_GVK_ERROR_MAPPING env variable to the agent deployment, following the same pattern used by EXPERIMENTAL_COPY_RESOURCES_DOWNSTREAM. The env var name is defined as a single exported constant (EnvVarWranglerCheckGVKErrorMapping) in internal/config, replacing the package-private copy that existed in the summary package. Refers to: #5060 --------- Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
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 controller now forwards the CATTLE_WRANGLER_CHECK_GVK_ERROR_MAPPING env variable to the agent deployment, following the same pattern used by EXPERIMENTAL_COPY_RESOURCES_DOWNSTREAM.
The env var name is defined as a single exported constant (EnvVarWranglerCheckGVKErrorMapping) in internal/config, replacing the package-private copy that existed in the summary package.
Refers to: #5060
Additional Information
Checklist
- [ ] I have updated the documentation via a pull request in the fleet-product-docs repository.