runatlantis / helm-charts

Atlantis Helm Chart
Apache License 2.0
114 stars 181 forks source link

Help to use version 5.4.0 of helm chart #405

Open leandromoreirati opened 2 months ago

leandromoreirati commented 2 months ago

Hi, Everyone!

How are you?

I'm testing upgrade of my atlantis chart version of the 4.13.0 to 5.4.0, I adjusted all needed parameters but when I execute the helm I'm receiving the following error:

Error: template: atlantis/templates/statefulset.yaml:44:47: executing "atlantis/templates/statefulset.yaml" at <.Values.dnsPolicy>: dnsPolicy is not a method but has arguments

image

I commented the parameter dnsPolicy inte the values file, but error persists.

Anyone could be a a sugestion how solve this problemas, please?

I grateful any tip.

patipat-paypay commented 2 months ago

I face the same issue if I use helm client version v3.8.1. There is no issue when I use helm client version v3.14.3. If you need to stick with the older version. You can try rearrange the code https://github.com/runatlantis/helm-charts/blob/main/charts/atlantis/templates/statefulset.yaml#L44 to

{{- if and (or .Values.dnsPolicy (and .Values.dnsPolicy .Values.dnsConfig)) (ne .Values.dnsPolicy "ClusterFirst") }}