diff --git a/helm/tenant/templates/tenant-configuration.yaml b/helm/tenant/templates/tenant-configuration.yaml index 1638f9f7fa..74b167121a 100644 --- a/helm/tenant/templates/tenant-configuration.yaml +++ b/helm/tenant/templates/tenant-configuration.yaml @@ -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 }} @@ -26,4 +27,5 @@ stringData: {{- end }} {{- end }} {{- end }} +{{- end }} diff --git a/helm/tenant/values.yaml b/helm/tenant/values.yaml index 52d8ca8dd6..8f32cee993 100644 --- a/helm/tenant/values.yaml +++ b/helm/tenant/values.yaml @@ -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.