Commit d8c1b9e9 authored by Enrico Bocchi's avatar Enrico Bocchi
Browse files

fusex: Fix overriding defaults set to 1s with 0s

parent 79aeb966
Pipeline #2728195 passed with stage
in 1 minute and 7 seconds
......@@ -5,6 +5,13 @@ metadata:
labels:
{{- include "fusex.labels" . | nindent 4 }}
data:
#
# Helm interprets a value set to 0 as null and hence uses the default
# This is buggy for us as it does not allow to override a 1 default with a 0.
#
# Here we check if the type of the values is float64 and, if so, we use it instead of the default.
# Upstream tracker: https://github.com/helm/helm/issues/3164
#
fuse.eos.conf: |
{{- with .Values.fusex.config }}
{
......@@ -13,15 +20,15 @@ data:
"remotemountdir": "{{ .remotemountdir }}",
"localmountdir": "/eos",
"auth": {
"shared-mount": {{ .auth.shared_mount | default 1 }},
"sss": {{ .auth.sss | default 1 }},
"shared-mount": {{ if kindIs "float64" .auth.shared_mount }}{{ .auth.shared_mount }}{{ else }}1{{ end }},
"sss": {{ if kindIs "float64" .auth.sss }}{{ .auth.sss }}{{ else }}1{{ end }},
"ssskeytab": "/etc/eos/fuse.sss.keytab",
"gsi-first": {{ .auth.gsi_first | default 0 }},
"krb5": {{ .auth.krb5 | default 0 }},
"oauth2": {{ .auth.oauth2 | default 1 }}
"gsi-first": {{ if kindIs "float64" .auth.gsi_first }}{{ .auth.gsi_first }}{{ else }}0{{ end }},
"krb5": {{ if kindIs "float64" .auth.krb5 }}{{ .auth.krb5 }}{{ else }}0{{ end }},
"oauth2": {{ if kindIs "float64" .auth.oauth2 }}{{ .auth.oauth2 }}{{ else }}1{{ end }}
},
"options": {
"hide-versions": {{ .options.hide_versions | default 0 }}
"hide-versions": {{ if kindIs "float64" .options.hide_versions }}{{ .options.hide_versions }}{{ else }}0{{ end }}
}
}
{{- end }}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment