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 upgrade failed: yaml: unmarshal errors: line 24: mapping key "app" already defined at line 23 48m #286

Closed
rajivchirania opened this issue Jun 28, 2021 · 3 comments

Comments

@rajivchirania
Copy link

Describe the bug

Most of my helmrelease are failing to upgrade after i moved to flux v2

To Reproduce

Steps to reproduce the behaviour:

  1. Install flux v2 using terraform 0.15.3 version
  2. Getting below error with kustomize
    Helm upgrade failed: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors:
    line 24: mapping key "app" already defined at line 23
  • Kubernetes version: 1.20

Below please provide the output of the following commands:

flux version 0.15.2
flux check

► checking prerequisites
✗ flux 0.15.2 <0.15.3 (new version is available, please upgrade)
✗ kubectl version v1.16.2 < >=1.18.0-0
✔ Kubernetes 1.20.4-eks-6b7464 >=1.16.0-0
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v0.11.1
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v0.13.0
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v0.15.0
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v0.15.2


example helmrelease file:


---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: my-app
  namespace: services
  annotations:
    fluxcd.io/automated: "false"
spec:
  interval: 5m
  releaseName: my-app
  chart:
    spec:
      chart: charts/my-app
      sourceRef:
        kind: GitRepository
        name: app-deployments
  rollback:
    timeout: 10m
    disableWait: false
  upgrade:
    timeout: 10m
    disableWait: false      
  values:
    global:
      app: 'my-app'
    labels:
      app: 'my-app'
      environment: 'platform'
      tier: 'frontend'
      version: 'v1'
@stefanprodan
Copy link
Member

Duplicate of: fluxcd/flux2#1522

@stefanprodan stefanprodan transferred this issue from fluxcd/flux2 Jun 29, 2021
@rajivchirania
Copy link
Author

Duplicate of: fluxcd/flux2#1522

Do we have a estimate when this will be fixed or some kind of cleaner workaround

@stefanprodan
Copy link
Member

@rajivchirania the only fix it to remove duplicate keys from your chart.

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

2 participants