litmus-helm icon indicating copy to clipboard operation
litmus-helm copied to clipboard

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

Open ayanevbg opened this issue 1 year ago • 1 comments

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

ayanevbg avatar Feb 12 '24 10:02 ayanevbg

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.

Calvinaud avatar Feb 27 '24 08:02 Calvinaud

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

uditgaurav avatar May 13 '24 11:05 uditgaurav