Skip to content

Commit b261e45

Browse files
committed
fix: adding an environment value to enable the ignoring of the name, accessKey and secretKey in configSecret.
In version 6.0.4 the inclusion of [this check](https://github.com/minio/operator/pull/2299/files#diff-1320c71ce4251e5e50c3b17c8aee11659e44a7208d1ab8d5c4f68694c02d9e80R20-R25) broke the ability to pass an existing secret because the default values provided in the values.yaml file, caused the error to trigger. Now we can presume in dev that the vluaes will be provided in line and in prod, they are provided via an existing secret.
1 parent b5dd4cf commit b261e45

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

helm/tenant/templates/tenant-configuration.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ stringData:
1717
export MINIO_ROOT_PASSWORD={{ .Values.tenant.configSecret.secretKey | quote }}
1818
1919
{{- else }}
20+
{{- if eq .Values.tenant.environment "dev" }}
2021
{{- if (.Values.tenant.configSecret.accessKey) }}
2122
{{- fail "# ERROR: cannot set access-key when an existing secret is used" }}
2223
{{- end }}
@@ -26,4 +27,5 @@ stringData:
2627
{{- end }}
2728
{{- end }}
2829
{{- end }}
30+
{{- end }}
2931

helm/tenant/values.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ tenant:
4747
# The secret is expected to have a key named config.env containing environment variables exports.
4848
configuration:
4949
name: myminio-env-configuration
50+
51+
###
52+
# The environment into which this tenant will be deployed.
53+
# Valid options:
54+
#
55+
# environment: dev # will presume you are using the config secret in line as shown below.
56+
# environment: prod # will ignore the name, accessKey and secretKey fields and enforce the existing option.
57+
environment: dev
58+
5059
###
5160
# Root key for dynamically creating a secret for use with configuring root MinIO User
5261
# Specify the ``name`` and then a list of environment variables.

0 commit comments

Comments
 (0)