litmuschaos / litmus-helm

Helm Charts for the Litmus Chaos Operator & CRDs
Apache License 2.0
45 stars 85 forks source link

litmus-agent helm rendering fails with duplicate labels for sub helm chart #361

Closed ayanevbg closed 4 months ago

ayanevbg commented 7 months ago

When I try to install litmus-agent helm chart for versions >=0.2.0 it fails with the following error:

Sub charts - https://github.com/litmuschaos/litmus-helm/tree/master/charts/litmus-agent/charts have duplicate labels for

litmuschaos.io/app: app.kubernetes.io/name: app.kubernetes.io/instance:

This is caused because the deployments have both .selectorLabels and .labels added to the manifest.

Example: https://github.com/litmuschaos/litmus-helm/blob/31a0a30a370c64de6227bfb0ff10035c4b2dcd8c/charts/litmus-agent/charts/chaos-exporter/templates/deployment.yaml#L21-L22

In the helpers the selectorLabels are included in labels :

https://github.com/litmuschaos/litmus-helm/blob/31a0a30a370c64de6227bfb0ff10035c4b2dcd8c/charts/litmus-agent/charts/chaos-exporter/templates/_helpers.tpl#L38

Calvinaud commented 7 months ago

Hello,

The issue was introduced in my PR : https://github.com/litmuschaos/litmus-helm/pull/327. I create a new PR to fix it. I don't know why but I had no issue when deploying the chart.

uditgaurav commented 4 months ago

Thanks @Calvinaud for the PR. Please feel free to update the PR with master.