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

Kustomize 5.4.0+ regression: null values set in HelmChartInflationGenerator are ignored #20808

Open
3 tasks done
erwanval opened this issue Nov 15, 2024 · 2 comments
Open
3 tasks done
Labels
blocked Unable to progress for reasons outside our control bug Something isn't working version:2.13 Latest confirmed affected version is 2.13

Comments

@erwanval
Copy link

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

Kustomize's HelmChartInflationGenerator ignore null values, which prevent removal of default values set in source chart's values.yaml.
This seems to be a regression from Kustomize 5.4.0 (see kustomize issue).
It worked properly with ArgoCD v2.11.0 (bundled with kustomize 5.2.1).

To Reproduce

# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

generators:
  - helmchartinflation-crowdsec.yaml
# helmchartinflation-crowdsec.yaml
apiVersion: builtin
kind: HelmChartInflationGenerator
metadata:
  name: crowdsec
releaseName: crowdsec
namespace: crowdsec
name: crowdsec
repo: https://crowdsecurity.github.io/helm-charts
version: 0.13.0
includeCRDs: true
valuesInline:
  lapi:
    resources:
      requests:
        cpu: 10m
        memory: 100Mi
      limits:
        cpu: null # We want to remove the default from values.yaml
        memory: 100Mi
    persistentVolume:
      config:
        enabled: false
      data:
        enabled: false
  agent:
    resources:
      requests:
        cpu: 10m
        memory: 100Mi
      limits:
        cpu: null # We want to remove the default from values.yaml
        memory: 100Mi
    acquisition:
      - namespace: ingress-nginx
        podName: ingress-nginx-controller-*
        program: nginx

Expected behavior

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: crowdsec-agent
spec:
  [...]
  template:
    [...]
    spec:
      [...]
      containers:
        [...]
          resources:
            limits:
              memory: 100Mi
            requests:
              cpu: 10m
              memory: 100Mi

Actual Output

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: crowdsec-agent
spec:
  [...]
  template:
    [...]
    spec:
      [...]
      containers:
        [...]
          resources:
            limits:
              cpu: 500m # default from values.yaml still set
              memory: 100Mi
            requests:
              cpu: 10m
              memory: 100Mi

Screenshots

Version

argocd: v2.13.0+347f221
  BuildDate: 2024-11-04T12:09:06Z
  GitCommit: 347f221adba5599ef4d5f12ee572b2c17d01db4d
  GitTreeState: clean
  GoVersion: go1.23.1
  Compiler: gc
  Platform: linux/amd64

Logs

Paste any relevant application logs here.
@erwanval erwanval added the bug Something isn't working label Nov 15, 2024
@andrii-korotkov-verkada andrii-korotkov-verkada added the version:2.13 Latest confirmed affected version is 2.13 label Nov 15, 2024
@andrii-korotkov-verkada
Copy link
Contributor

Using null as a way to remove the default value seems a bit hacky. From a design perspective, it shouldn't be in common values, but be in some common file for a subset of things. But overall, I think it may be justified to simplify overall configuration management.

@crenshaw-dev
Copy link
Member

For now, the workaround is to load a working Kustomize version onto your repo server. If/when Kustomize patches the issue upstream, assuming it's on a patch release, we'll bump the version in 2.13.x.

@andrii-korotkov-verkada andrii-korotkov-verkada added the blocked Unable to progress for reasons outside our control label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Unable to progress for reasons outside our control bug Something isn't working version:2.13 Latest confirmed affected version is 2.13
Projects
None yet
Development

No branches or pull requests

3 participants