GoogleContainerTools / skaffold

Easy and Repeatable Kubernetes Development
https://skaffold.dev/
Apache License 2.0
15.03k stars 1.62k forks source link

Assign NULL in deploy.helm.releases.[0].setValueTemplates #9066

Open YunanJeong opened 1 year ago

YunanJeong commented 1 year ago

Expected behavior

I wanted to use skaffold dev, after temporarily removing some defaults in the Helm template. (e.g. nodeSelector)

In the skaffold.yaml below, Expected behavior is that the nodeSelector statement is deleted, when null or {} is assigned to deploy.helm.releases.[0].setValueTemplates.nodeSelector.

Actual behavior

"null", "" works correctly null, {}, "{}" doesn't work

Information

# my default helm values
(...)
nodeSelector:
  my-node: worker
(...)
# skaffold.yaml
(...)
  - name: alpha                               
    patches:
      - op: add
        path: /deploy/helm/releases
        value:
          - name: my-release                
            (...)
            setValueTemplates:
              nodeSelector: "null"  # PASS: "null", ""  # FAIL: {}, "{}", null  
(...)

P.S.

ericzzzzzzz commented 1 year ago

Hi @YunanJeong here is the docs https://skaffold.dev/docs/references/yaml/#deploy-helm-releases-setValueTemplates for helm setValueTemplate