Skip to content

Commit

Permalink
fix: adding an environment value to enable the ignoring of the name, …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
drew-viles committed Oct 30, 2024
1 parent b5dd4cf commit b261e45
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helm/tenant/templates/tenant-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ stringData:
export MINIO_ROOT_PASSWORD={{ .Values.tenant.configSecret.secretKey | quote }}
{{- else }}
{{- if eq .Values.tenant.environment "dev" }}
{{- if (.Values.tenant.configSecret.accessKey) }}
{{- fail "# ERROR: cannot set access-key when an existing secret is used" }}
{{- end }}
Expand All @@ -26,4 +27,5 @@ stringData:
{{- end }}
{{- end }}
{{- end }}
{{- end }}

9 changes: 9 additions & 0 deletions helm/tenant/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ tenant:
# The secret is expected to have a key named config.env containing environment variables exports.
configuration:
name: myminio-env-configuration

###
# The environment into which this tenant will be deployed.
# Valid options:
#
# environment: dev # will presume you are using the config secret in line as shown below.
# environment: prod # will ignore the name, accessKey and secretKey fields and enforce the existing option.
environment: dev

###
# Root key for dynamically creating a secret for use with configuring root MinIO User
# Specify the ``name`` and then a list of environment variables.
Expand Down

0 comments on commit b261e45

Please sign in to comment.