File tree Expand file tree Collapse file tree 4 files changed +25
-13
lines changed Expand file tree Collapse file tree 4 files changed +25
-13
lines changed Original file line number Diff line number Diff line change
1
+ {{- with .Values.tenant }}
2
+
3
+ # If an existing secret is used, do not set access-key and secret-key explicitly
4
+ # (note that we allow the default settings in values.yaml)
5
+ {{- with .configSecret }}
6
+ {{- if .existingSecret }}
7
+ {{- if and .accessKey (ne .accessKey "minio") }}
8
+ {{- fail "Cannot set access-key when an existing secret is used" }}
9
+ {{- end }}
10
+ {{- if and .secretKey (ne .secretKey "minio123") }}
11
+ {{- fail "Cannot set secret-key when an existing secret is used" }}
12
+ {{- end }}
13
+ {{- end }}
14
+ {{- end }}
15
+
16
+ # If configuration.name is set and not the same as configSecret.name,
17
+ # then we should raise an error and abort
18
+ {{- if and .configuration .configuration.name }}
19
+ {{- if and .configSecret (ne .configuration.name .configSecret.name) -}}
20
+ {{- fail "configuration.name is deprecated and doesn't match .tenant.configSecret.name" }}
21
+ {{- end -}}
22
+ {{- end }}
23
+
24
+ {{- end }}
Original file line number Diff line number Diff line change @@ -16,13 +16,6 @@ stringData:
16
16
export MINIO_ROOT_USER={{ .Values.tenant.configSecret.accessKey | quote }}
17
17
export MINIO_ROOT_PASSWORD={{ .Values.tenant.configSecret.secretKey | quote }}
18
18
19
- {{- else }}
20
- {{- if (.Values.tenant.configSecret.accessKey) }}
21
- {{- fail "# ERROR: cannot set access-key when an existing secret is used" }}
22
- {{- end }}
23
- {{- if (.Values.tenant.configSecret.secretKey) }}
24
- {{- fail "# ERROR: cannot set secret-key when an existing secret is used" }}
25
- {{- end }}
26
19
{{- end }}
27
20
{{- end }}
28
21
{{- end }}
Original file line number Diff line number Diff line change 30
30
{{- end }}
31
31
# # Secret with default environment variable configurations
32
32
configuration :
33
- name : {{ .configuration .name }}
33
+ name : {{ .configSecret .name }}
34
34
{{- if hasKey . "poolsMetadata" }}
35
35
poolsMetadata : {{- if eq (len .poolsMetadata) 0 }} {} {{- end }}
36
36
{{- with (dig "poolsMetadata" (dict) .) }}
Original file line number Diff line number Diff line change @@ -67,11 +67,6 @@ tenant:
67
67
# Specify an empty dictionary ``{}`` to dispatch pods with the default scheduler.
68
68
scheduler : { }
69
69
# ##
70
- # The Kubernetes secret name that contains MinIO environment variable configurations.
71
- # The secret is expected to have a key named config.env containing environment variables exports.
72
- configuration :
73
- name : myminio-env-configuration
74
- # ##
75
70
# Root key for dynamically creating a secret for use with configuring root MinIO User
76
71
# Specify the ``name`` and then a list of environment variables.
77
72
#
You can’t perform that action at this time.
0 commit comments