Duplicate labels app and release in template of gitlab-exporter deployment
Summary
The helm chart for gitlab-exporter generates two duplicate labels in the template of the deployment:
https://gitlab.com/gitlab-org/charts/gitlab/-/blob/45e2495be0e65a13087bf1166f8720220b093861/charts/gitlab/charts/gitlab-exporter/templates/deployment.yaml#L24-27
The labels app
and release
are part of common-labels
and also specified separately again.
This causes errors with yaml unmarshalling in some tools (e.g. kustomize).
Steps to reproduce
Create kustomization.yaml
with:
namespace: gitlab
resources:
- gitlab.yaml
and run
helm template gitlab gitlab/gitlab -n gitlab --version 5.0.5 --set certmanager-issuer.email="test@example.com" > gitlab.yaml
kustomize build
Configuration used
certmanager-issuer.email="test@example.com"
Current behavior
kustomize aborts with error:
$ helm template gitlab gitlab/gitlab -n gitlab --version 5.0.5 --set certmanager-issuer.email="test@example.com" > gitlab.yaml
$ kustomize build
Error: map[string]interface {}(nil): yaml: unmarshal errors:
line 12: mapping key "app" already defined at line 6
line 13: mapping key "release" already defined at line 8
Expected behavior
kustomize can load and interpret the helm generated manifests and build the project.
Versions
- Chart: 5.0.5
- Helm:
version.BuildInfo{Version:"v3.5.4", GitCommit:"", GitTreeState:"", GoVersion:"go1.16.4"}
- Kustomize:
{Version:4.1.3 GitCommit:9e8e7a7fe99ec9fbf801463e8607928322fc5245 BuildDate:1970-01-01T00:00:00Z GoOs:linux GoArch:amd64}
Edited by Tim Neumann