Skip to content
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

Generated manifests have duplicate selector labels #125

Open
tico24 opened this issue May 13, 2024 · 0 comments
Open

Generated manifests have duplicate selector labels #125

tico24 opened this issue May 13, 2024 · 0 comments

Comments

@tico24
Copy link

tico24 commented May 13, 2024

To recreate, in the operator-wandb directory run:

helm dependency update
helm template -s charts/app/templates/deployment.yaml . > out.yaml
cat out.yaml

The resulting yaml will have duplicate selector labels:

...
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: app
      app.kubernetes.io/instance: release-name
      helm.sh/chart: app-0.1.0
      app.kubernetes.io/name: app
      app.kubernetes.io/instance: release-name
      app.kubernetes.io/version: "0.33.0"
      wandb.com/app-name: app-0.1.0
      app.kubernetes.io/managed-by: Helm
...

Note app.kubernetes.io/name: app and app.kubernetes.io/instance: release-name are duplicated.

On the whole, kubernetes ignores the duplication. Kustomize is less nice and will throw errors along these lines:

error: map[string]interface {}(nil): yaml: unmarshal errors:
  line 20: mapping key "app.kubernetes.io/name" already defined at line 17
  line 21: mapping key "app.kubernetes.io/instance" already defined at line 18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant