Commit 45067296 authored by Fabio Luchetti's avatar Fabio Luchetti
Browse files

fusex: Fix overriding defaults set to 1s with 0s: typecheck on int64, not...

fusex: Fix overriding defaults set to 1s with 0s: typecheck on int64, not float64 - completes d8c1b9e9
parent c72291a6
Pipeline #2937805 passed with stage
in 29 seconds
...@@ -9,7 +9,7 @@ data: ...@@ -9,7 +9,7 @@ data:
# Helm interprets a value set to 0 as null and hence uses the default # 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. # 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. # Here we check if the type of the values is int64 and, if so, we use it instead of the default.
# Upstream tracker: https://github.com/helm/helm/issues/3164 # Upstream tracker: https://github.com/helm/helm/issues/3164
# #
fuse.eos.conf: | fuse.eos.conf: |
...@@ -20,15 +20,15 @@ data: ...@@ -20,15 +20,15 @@ data:
"remotemountdir": "{{ .remotemountdir }}", "remotemountdir": "{{ .remotemountdir }}",
"localmountdir": "/eos", "localmountdir": "/eos",
"auth": { "auth": {
"shared-mount": {{ if kindIs "float64" .auth.shared_mount }}{{ .auth.shared_mount }}{{ else }}1{{ end }}, "shared-mount": {{ if kindIs "int64" .auth.shared_mount }}{{ .auth.shared_mount }}{{ else }}1{{ end }},
"sss": {{ if kindIs "float64" .auth.sss }}{{ .auth.sss }}{{ else }}1{{ end }}, "sss": {{ if kindIs "int64" .auth.sss }}{{ .auth.sss }}{{ else }}1{{ end }},
"ssskeytab": "/etc/eos.keytab", "ssskeytab": "/etc/eos.keytab",
"gsi-first": {{ if kindIs "float64" .auth.gsi_first }}{{ .auth.gsi_first }}{{ else }}0{{ end }}, "gsi-first": {{ if kindIs "int64" .auth.gsi_first }}{{ .auth.gsi_first }}{{ else }}0{{ end }},
"krb5": {{ if kindIs "float64" .auth.krb5 }}{{ .auth.krb5 }}{{ else }}0{{ end }}, "krb5": {{ if kindIs "int64" .auth.krb5 }}{{ .auth.krb5 }}{{ else }}0{{ end }},
"oauth2": {{ if kindIs "float64" .auth.oauth2 }}{{ .auth.oauth2 }}{{ else }}1{{ end }} "oauth2": {{ if kindIs "int64" .auth.oauth2 }}{{ .auth.oauth2 }}{{ else }}1{{ end }}
}, },
"options": { "options": {
"hide-versions": {{ if kindIs "float64" .options.hide_versions }}{{ .options.hide_versions }}{{ else }}0{{ end }} "hide-versions": {{ if kindIs "int64" .options.hide_versions }}{{ .options.hide_versions }}{{ else }}0{{ end }}
} }
} }
{{- 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