You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected: Paralus v0.2.9 is installed via Helm Chart successfully when using FluxCD
Actual: Post-render step and installation fails due to duplicate app.kubernetes.io/component label
Steps to reproduce the bug
Create a local kind cluster: kind create cluster
Install Flux on the cluster: kubectl apply -f https://github.com/fluxcd/flux2/releases/latest/download/install.yaml
Wait for resources to come up in the flux-system namespace
Create barebones HelmRepository and HelmRelease resources for Flux to install 0.2.9:
Install fails. View helmrelease resource for error:
$ kubectl describe helmrelease paralusName: paralusNamespace: flux-systemLabels: <none>Annotations: <none>API Version: helm.toolkit.fluxcd.io/v2Kind: HelmReleaseMetadata:
Creation Timestamp: 2025-02-19T17:22:24ZFinalizers:
finalizers.fluxcd.ioGeneration: 1Resource Version: 1544UID: 5f4065be-555e-46bb-9b42-d200371babf7Spec:
Chart:
Spec:
Chart: ztkaReconcile Strategy: ChartVersionSource Ref:
Kind: HelmRepositoryName: paralusVersion: >=0.2.*Install:
Create Namespace: trueInterval: 10m0sRelease Name: paralusTarget Namespace: paralusValues:
Deploy:
Postgresql:
Enable: trueStatus:
Conditions:
Last Transition Time: 2025-02-19T17:22:27ZMessage: Running 'install' action with timeout of 5m0sObserved Generation: 1Reason: ProgressingStatus: TrueType: ReconcilingLast Transition Time: 2025-02-19T17:22:28ZMessage: Helm install failed for release paralus/paralus with chart [email protected]: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors:line 14: mapping key "app.kubernetes.io/component" already defined at line 9Observed Generation: 1Reason: InstallFailedStatus: FalseType: ReadyLast Transition Time: 2025-02-19T17:22:27ZMessage: Helm install failed for release paralus/paralus with chart [email protected]: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors:line 14: mapping key "app.kubernetes.io/component" already defined at line 9Observed Generation: 1Reason: InstallFailedStatus: FalseType: ReleasedFailures: 2Helm Chart: flux-system/flux-system-paralusLast Attempted Config Digest: sha256:b3d7c5001e0cb84511e487596a464f377bfc51ee3ad6edd87511a351a8ac5317Last Attempted Generation: 1Last Attempted Release Action: installLast Attempted Revision: 0.2.9Observed Generation: -1Storage Namespace: flux-systemEvents:
Type Reason Age From Message---- ------ ---- ---- -------Normal HelmChartCreated 4s helm-controller Created HelmChart/flux-system/flux-system-paralus with SourceRef 'HelmRepository/flux-system/paralus'Warning InstallFailed 2s helm-controller Helm install failed for release paralus/paralus with chart [email protected]: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors:line 14: mapping key "app.kubernetes.io/component" already defined at line 9Last Helm logs:
2025-02-19T17:22:27.062811632Z: applying CustomResourceDefinition(s) with policy Create2025-02-19T17:22:27.062813507Z: creating 1 resource(s)2025-02-19T17:22:27.067431046Z: CustomResourceDefinition contourconfigurations.projectcontour.io is already present. Skipping.2025-02-19T17:22:27.06743238Z: creating 1 resource(s)2025-02-19T17:22:27.069853336Z: CustomResourceDefinition extensionservices.projectcontour.io is already present. Skipping.2025-02-19T17:22:27.069854628Z: creating 1 resource(s)2025-02-19T17:22:27.07688629Z: CustomResourceDefinition httpproxies.projectcontour.io is already present. Skipping.2025-02-19T17:22:27.076887582Z: creating 1 resource(s)2025-02-19T17:22:27.078951955Z: CustomResourceDefinition tlscertificatedelegations.projectcontour.io is already present. Skipping.Warning InstallFailed 1s helm-controller Helm install failed for release paralus/paralus with chart [email protected]: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors:line 14: mapping key "app.kubernetes.io/component" already defined at line 9
Are you using the latest version of the project?
You can check your version by running helm ls|grep '^<deployment-name>' or using pctl, pctl version, and provide the output.
0.2.9
What is your environment setup? Please tell us your cloud provider, operating system, and include the output of kubectl version --output=yaml and helm version. Any other information that you have, eg. logs and custom values, is highly appreciated!
(optional) If you have ideas on why the bug happens or how it can be solved, please provide it here
This is a combination of the changes introduced here. Adding app.kubernetes.io/component: kratos to this include causes a conflict with the app.kubernetes.io/component: configuration label already applied to the kratos-config-hooks ConfigMap here.
Using helm template makes the issue clearer. The generated YAML is invalid :
This isn't caught in a regular helm install because Helm doesn't care about duplicate keys and doesn't validate YAML. Flux's Helm controller however parses and validates YAML, specifically due to using kyaml. Here's a relevant issue in the repo for Flux's helm controller: fluxcd/helm-controller#283.
More to the point, there shouldn't be duplicate keys/invalid YAML at all, and not being able to apply the chart via Flux is a massive pain point.
The fix is very straightforward: remove one of those two labels.
I've described the bug, included steps to reproduce it, and included my environment setup with all customizations.
I'm using the latest version of the project.
The text was updated successfully, but these errors were encountered:
Expected vs actual behavior
Expected: Paralus v0.2.9 is installed via Helm Chart successfully when using FluxCD
Actual: Post-render step and installation fails due to duplicate
app.kubernetes.io/component
labelSteps to reproduce the bug
kind
cluster:kind create cluster
kubectl apply -f https://github.com/fluxcd/flux2/releases/latest/download/install.yaml
flux-system
namespaceHelmRepository
andHelmRelease
resources for Flux to install 0.2.9:helmrelease
resource for error:Are you using the latest version of the project?
You can check your version by running
helm ls|grep '^<deployment-name>'
or using pctl,pctl version
, and provide the output.What is your environment setup? Please tell us your cloud provider, operating system, and include the output of
kubectl version --output=yaml
andhelm version
. Any other information that you have, eg. logs and custom values, is highly appreciated!kubectl output:
helm output:
version.BuildInfo{Version:"v3.16.3", GitCommit:"v3.16.3", GitTreeState:"", GoVersion:"go1.23.3"}
(optional) If you have ideas on why the bug happens or how it can be solved, please provide it here
This is a combination of the changes introduced here. Adding
app.kubernetes.io/component: kratos
to this include causes a conflict with theapp.kubernetes.io/component: configuration
label already applied to thekratos-config-hooks
ConfigMap here.Using
helm template
makes the issue clearer. The generated YAML is invalid :Passing the output through a YAML linter also flags it up:
This isn't caught in a regular
helm install
because Helm doesn't care about duplicate keys and doesn't validate YAML. Flux's Helm controller however parses and validates YAML, specifically due to usingkyaml
. Here's a relevant issue in the repo for Flux's helm controller: fluxcd/helm-controller#283.More to the point, there shouldn't be duplicate keys/invalid YAML at all, and not being able to apply the chart via Flux is a massive pain point.
The fix is very straightforward: remove one of those two labels.
The text was updated successfully, but these errors were encountered: