add option for namespace in values instead of Release.Namespace#1158
Open
ac427 wants to merge 1 commit into
Open
add option for namespace in values instead of Release.Namespace#1158ac427 wants to merge 1 commit into
ac427 wants to merge 1 commit into
Conversation
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.
feat: Add configurable namespace support to Helm chart
Problem
All chart resources were hardcoded to use
{{ .Release.Namespace }}, which forced Trident to be installed into whichever namespace Helm was deployed to. There was no way to deploy the operator in one namespace while running Trident in another, and the pre-delete hook scripts had the namespace literally hardcoded astrident.Solution
Introduced a
namespacevalue that, when set, overrides the Helm release namespace across all chart resources. A singletrident.namespacehelper centralizes the resolution logic so there is only one place to change if the behavior needs to evolve.Changes
values.yaml
namespace: ""— leave empty to use Helm release namespace (default/backward-compatible behavior)templates/_helpers.tpltrident.namespacehelper: resolvesValues.namespaceif set, falls back toRelease.NamespaceshouldInstallRancherRolesto use the helper instead ofRelease.NamespacedirectlyTemplates updated to use
{{ include "trident.namespace" . }}:-n tridentBackward Compatibility
namespaceempty preserves existing behaviornamespaceare unaffectedUsage
Also Included
UPGRADE FAILED: no matches for kind "TridentOrchestrator"by addingpost-install,post-upgradehook annotations toTridentOrchestratorandTridentConfiguratorresources, ensuring CRDs are registered before custom resources are applied