-
Notifications
You must be signed in to change notification settings - Fork 98
[platform] Fix installing HelmReleases on initial setup #833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
WalkthroughThis update modifies the HelmRelease template within the core platform package. The main change introduces an explicit check for the availability of the "helm.toolkit.fluxcd.io/v2" API version before performing a HelmRelease lookup, ensuring the lookup is only executed when the API is present in the cluster. Additionally, the template's indentation is refined for improved formatting consistency. No changes are made to exported or public function or data structure signatures. Changes
Sequence Diagram(s)sequenceDiagram
participant Template as HelmRelease Template
participant Cluster as Kubernetes Cluster
Template->>Cluster: Check if API version "helm.toolkit.fluxcd.io/v2" is available
alt API version available
Template->>Cluster: Perform HelmRelease lookup
Template->>Template: Process lookup result
else API version not available
Template->>Template: Skip HelmRelease lookup
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
packages/core/platform/templates/helmreleases.yaml (3)
10-10
: Correctly collecting dependency namespaces
Usingset
with the blank identifier to build the$dependencyNamespaces
map is the appropriate Helm pattern. The YAMLlint warning about “too many spaces after hyphen” here is a false positive caused by Helm’s{{-
trimming syntax and can be safely ignored or suppressed.🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 10-10: too many spaces after hyphen
(hyphens)
18-23
: Guarding deletion lookup with API version check
Introducing the.Capabilities.APIVersions.Has "helm.toolkit.fluxcd.io/v2"
guard before callinglookup
ensures you won’t trigger runtime errors in clusters without the Flux v2 API. This change aligns perfectly with the PR’s goal to fix initial setup behavior. As above, you can disregard YAMLlint’s hyphen‐spacing warnings on these lines.🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 18-18: too many spaces after hyphen
(hyphens)
[warning] 19-19: too many spaces after hyphen
(hyphens)
[warning] 20-20: too many spaces after hyphen
(hyphens)
[warning] 21-21: too many spaces after hyphen
(hyphens)
[warning] 22-22: too many spaces after hyphen
(hyphens)
[warning] 23-23: too many spaces after hyphen
(hyphens)
87-92
: FilteringdependsOn
entries against disabled components
The updated loop now skips any dependency listed in$disabledComponents
, preventing unwanted cross-chart dependencies. The YAMLlint “too many spaces after hyphen” warnings on these templating lines can be ignored or disabled in your linter config.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/core/platform/templates/helmreleases.yaml
(3 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
packages/core/platform/templates/helmreleases.yaml
[warning] 10-10: too many spaces after hyphen
(hyphens)
[warning] 18-18: too many spaces after hyphen
(hyphens)
[warning] 19-19: too many spaces after hyphen
(hyphens)
[warning] 20-20: too many spaces after hyphen
(hyphens)
[warning] 21-21: too many spaces after hyphen
(hyphens)
[warning] 22-22: too many spaces after hyphen
(hyphens)
[warning] 23-23: too many spaces after hyphen
(hyphens)
🔇 Additional comments (2)
packages/core/platform/templates/helmreleases.yaml (2)
64-64
: Merging chart-level values into rendering context
Merging the inline.Values
into the$values
dictionary preserves default‐then‐override semantics and follows established Helm best practices.
67-67
: Merging ConfigMap-sourced values correctly
By merging thefromYaml
output into$values
, you ensure external overrides from the ConfigMap take effect after the chart defaults. This is a solid addition.
fixes #832
This PR fixes regression on installing helmreleases, also some refactor
Signed-off-by: Andrei Kvapil kvapss@gmail.com