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

Helm chart contains duplicate labels #392

Closed
runningman84 opened this issue Mar 22, 2024 · 1 comment · Fixed by #393
Closed

Helm chart contains duplicate labels #392

runningman84 opened this issue Mar 22, 2024 · 1 comment · Fixed by #393

Comments

@runningman84
Copy link
Contributor

➜  local-path-provisioner git:(master) helm template .
####
---
# Source: local-path-provisioner/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: release-name-local-path-provisioner
  namespace: default
  labels:
    app.kubernetes.io/name: local-path-provisioner
    helm.sh/chart: local-path-provisioner-0.0.25-dev
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/version: "v0.0.25-dev"
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: local-path-provisioner
      app.kubernetes.io/instance: release-name
  template:
    metadata:
      labels:
        app.kubernetes.io/name: local-path-provisioner
        app.kubernetes.io/instance: release-name
        app.kubernetes.io/name: local-path-provisioner
        helm.sh/chart: local-path-provisioner-0.0.25-dev
        app.kubernetes.io/instance: release-name
        app.kubernetes.io/version: "v0.0.25-dev"
        app.kubernetes.io/managed-by: Helm
    spec:
####

The duplicate lines are a problem for flux which denies installing the chart

│     Message:               Helm install failed for release kube-system/local-path-provisioner with chart [email protected]: error while running post render on files: map[string │
│ ]interface {}(nil): yaml: unmarshal errors:                                                                                                                                                      
│   line 26: mapping key "app.kubernetes.io/name" already defined at line 24                                                                                                                       
│   line 28: mapping key "app.kubernetes.io/instance" already defined at line 25     
@visokoo
Copy link
Contributor

visokoo commented Mar 29, 2024

#394

Piggybacking on your change, but retained the piece under selector.matchLabels since that's immutable: #394

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

Successfully merging a pull request may close this issue.

2 participants