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

Unable to pass null as Helm value #16312

Open
3 tasks done
bodgit opened this issue Nov 13, 2023 · 3 comments
Open
3 tasks done

Unable to pass null as Helm value #16312

bodgit opened this issue Nov 13, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@bodgit
Copy link

bodgit commented Nov 13, 2023

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

I'm trying to pass a null as a Helm value to knock out a default chart value and ArgoCD seems to be stripping the value from the Application manifest.

The only bug I could find that seemed vaguely similar was #15566.

To Reproduce

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: vpa
  namespace: argocd
spec:
  project: cluster
  source:
    repoURL: https://charts.fairwinds.com/stable
    targetRevision: 3.0.2
    chart: vpa
    helm:
      valuesObject:
        recommender:
          resources:
            requests:
              cpu: 10m
              memory: 64Mi
            limits:
              cpu: null
              memory: 64Mi

Without setting the recommender.resources.limits.cpu value, it inherits the 200m value from the chart defaults, I don't want a CPU limit at all.

In the ArgoCD UI, there's no recommender.resources.limits.cpu key or value visible in the manifest. If I edit the manifest in the UI and add the key and null value in, it disappears from the manifest.

The desired manifest then shows the 200m value.

Expected behavior

null should be passed through to the underlying Helm chart.

Screenshots

image

Version

argocd: v2.8.4+c279299
  BuildDate: 2023-09-13T19:12:09Z
  GitCommit: c27929928104dc37b937764baf65f38b78930e59
  GitTreeState: clean
  GoVersion: go1.20.6
  Compiler: gc
  Platform: linux/amd64
@bodgit bodgit added the bug Something isn't working label Nov 13, 2023
@Pionerd
Copy link

Pionerd commented Dec 12, 2023

I think there has been a helm upgrade in one of the later versions of ArgoCD. There have been some recent changes around overriding values like this in helm. This may be a shot. I can override with null as you desire (v2.9.3), but then I run into #15566.

@AnhQKatalon
Copy link

AnhQKatalon commented Jun 7, 2024

There is a PR helm/helm#12879 to fix this bug on the Helm side, but it seems no one reviewed it. This bug is super annoying, and we cannot downgrade to the lower version above 2.9.1 to workaround this issue

@ghostsquad
Copy link

ah helm... can't wait for the community to move to something like Jsonnet. Also, if you want you can wrap helm in Jsonnet using Tanka. https://tanka.dev/helm/ then you can explicitly change whatever you want that helm doesn't support, or that a specific chart (via the values file) doesn't support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants