configmap.yaml 1.38 KB
Newer Older
1
2
3
apiVersion: v1
kind: ConfigMap
metadata:
Enrico Bocchi's avatar
Enrico Bocchi committed
4
  name: {{ include "fusex.fullname" . }}-cfgmap-fuse-conf
5
  labels:
Enrico Bocchi's avatar
Enrico Bocchi committed
6
    {{- include "fusex.labels" . | nindent 4 }}
7
data:
8
9
10
11
  #
  # 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.
  #
12
  # Here we check if the type of the values is int64 and, if so, we use it instead of the default.
13
14
  # Upstream tracker: https://github.com/helm/helm/issues/3164
  #
15
  fuse.eos.conf: |
Enrico Bocchi's avatar
Enrico Bocchi committed
16
    {{- with .Values.fusex.config }}
17
    {
18
      "name": "eos",
19
20
      "hostport": "{{ .eos_mgm_alias }}",
      "remotemountdir": "{{ .remotemountdir }}",
21
      "localmountdir": "/eos",
22
      "auth": {
23
24
        "shared-mount": {{ if kindIs "int64" .auth.shared_mount }}{{ .auth.shared_mount }}{{ else }}1{{ end }},
        "sss": {{ if kindIs "int64" .auth.sss }}{{ .auth.sss }}{{ else }}1{{ end }},
25
        "ssskeytab": "/etc/eos.keytab",
26
27
28
        "gsi-first": {{ if kindIs "int64" .auth.gsi_first }}{{ .auth.gsi_first }}{{ else }}0{{ end }},
        "krb5": {{ if kindIs "int64" .auth.krb5 }}{{ .auth.krb5 }}{{ else }}0{{ end }},
        "oauth2": {{ if kindIs "int64" .auth.oauth2 }}{{ .auth.oauth2 }}{{ else }}1{{ end }}
29
30
      },
      "options": {
31
        "hide-versions": {{ if kindIs "int64" .options.hide_versions }}{{ .options.hide_versions }}{{ else }}0{{ end }}
32
33
34
35
      }
    }
    {{- end }}