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 release installation fails with fluxcd/helm-controller #6303

Open
project-administrator opened this issue Jun 13, 2023 · 2 comments
Open
Labels
component/plugin-flux Issue related to kubeapps plugin to manage Helm charts via Flux kind/bug An issue that reports a defect in an existing feature

Comments

@project-administrator
Copy link

project-administrator commented Jun 13, 2023

Describe the bug

An attempt to install the helm release with fluxcd/helm-controller fails because of the following errors:

  Warning  error   97s (x8 over 3m21s)  helm-controller  Helm install failed: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors:
  line 103: mapping key "initialDelaySeconds" already defined at line 97
  line 112: mapping key "initialDelaySeconds" already defined at line 106

Basically, helm chart generates an invalid template with duplicate keys in YAML. fluxcd/helm-controller would not tolerate this, but command-line helm install would silently remove the duplicate keys.
Same issue from the fluxcd/helm-controller project: fluxcd/helm-controller#283

To Reproduce
Steps to reproduce the behavior:

  1. Install fluxcd with helm-controller running in the K8S cluster
  2. Attempt to install the kubeapps with fluxcd/helm-controller e.g.:
$ kubectl apply -f - <<EOF
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
  name: bitnami-repo-oci
  namespace: default
spec:
  interval: 6h
  url: oci://registry-1.docker.io/bitnamicharts
  type: oci
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: kubeapps
  namespace: default
spec:
  interval: 1h
  releaseName: kubeapps
  targetNamespace: default
  chart:
    spec:
      chart: kubeapps
      interval: 1m
      sourceRef:
        kind: HelmRepository
        name: bitnami-repo-oci
        namespace: default
EOF
  1. Check the failed deployment status: kubectl describe helmrelease kubeapps

Expected behavior
Helm chart should not generate duplicate keys in the resulting YAML. The deployment of the kubeapps helm chart should succeed with fluxcd/helm-controller.

  • Helm chart version: 12.4.3
  • Kubernetes version: 1.27.1
@project-administrator project-administrator added the kind/bug An issue that reports a defect in an existing feature label Jun 13, 2023
@absoludity
Copy link
Contributor

Thanks @project-administrator . Confirmed that simply templating the chart results in the following for the kubeapps-apis service (which has initialDelaySeconds duplicated).

          livenessProbe:
            failureThreshold: 6
            initialDelaySeconds: 60
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 5
            exec:
              command: ["grpc_health_probe", "-addr=:50051"]
            initialDelaySeconds: 10
          readinessProbe:
            failureThreshold: 6
            initialDelaySeconds: 0
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 5
            exec:
              command: ["grpc_health_probe", "-addr=:50051"]
            initialDelaySeconds: 5

@github-project-automation github-project-automation bot moved this to 🗂 Backlog in Kubeapps Jun 13, 2023
@absoludity
Copy link
Contributor

It'll be best to fix this upstream in the bitnami chart first, then we'll merge that change into our dev chart.

@ppbaena ppbaena added the component/plugin-flux Issue related to kubeapps plugin to manage Helm charts via Flux label Jun 14, 2023
@ppbaena ppbaena added this to the Technical debt milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/plugin-flux Issue related to kubeapps plugin to manage Helm charts via Flux kind/bug An issue that reports a defect in an existing feature
Projects
Status: 🗂 Backlog
Development

No branches or pull requests

3 participants