skaffold icon indicating copy to clipboard operation
skaffold copied to clipboard

Setting nodeSelector and tolerations values with setValues or setValueTemplates

Open radnov opened this issue 1 year ago • 2 comments

I'm trying to set nodeSelector and tolerations through the setValues and setValueTemplates configuration options, like this:

setValues:
  tolerations:
    - key: dedicated
      operator: Equal
      value: "true"
      effect: NoSchedule
  nodeSelector:
    dedicated: "true"

but when running skaffold deploy I get the following error:

Error: UPGRADE FAILED: failed to create resource: Deployment in version "v1" cannot be handled as a Deployment: json: cannot unmarshal bool into Go struct field PodSpec.spec.template.spec.nodeSelector of type string
deploying "web-client": install: exit status 1

I've also tried using setValueTemplates, but the result is the same.

Is it possible to configure a map based value like nodeSelector through setValues or setValueTemplates? It works fine if I use valuesFiles and a seaprate values file, but I'd like to avoid that.

radnov avatar Jan 30 '25 11:01 radnov

value: true value: "true"

remove the first value

idsulik avatar Feb 01 '25 16:02 idsulik

value: true value: "true"

remove the first value

That was a copy-paste mistake on my end. I've used the double-quoted value when trying to set those fields.

radnov avatar Feb 03 '25 06:02 radnov