diff --git a/instance-applications/510-550-ibm-mas-suite-app-config/templates/01-ibm-manage_attachments_secrets.yaml b/instance-applications/510-550-ibm-mas-suite-app-config/templates/01-ibm-manage_encryption_secret.yaml similarity index 51% rename from instance-applications/510-550-ibm-mas-suite-app-config/templates/01-ibm-manage_attachments_secrets.yaml rename to instance-applications/510-550-ibm-mas-suite-app-config/templates/01-ibm-manage_encryption_secret.yaml index 59fb77536..946606b17 100644 --- a/instance-applications/510-550-ibm-mas-suite-app-config/templates/01-ibm-manage_attachments_secrets.yaml +++ b/instance-applications/510-550-ibm-mas-suite-app-config/templates/01-ibm-manage_encryption_secret.yaml @@ -1,5 +1,6 @@ {{- if (or (eq .Values.mas_app_id "manage") (eq .Values.mas_app_id "health")) }} -{{- if .Values.manage_attachments_secret_name }} +{{- if hasKey .Values "global_secrets" }} +{{- if and (hasKey .Values "mas_appws_spec") (hasKey .Values.mas_appws_spec "settings") (hasKey .Values.mas_appws_spec.settings "db") (hasKey .Values.mas_appws_spec.settings.db "encryptionSecret") }} --- kind: Secret apiVersion: v1 @@ -11,10 +12,13 @@ metadata: labels: {{ .Values.custom_labels | toYaml | indent 4 }} {{- end }} - name: {{ .Values.manage_attachments_secret_name }} + name: {{ .Values.mas_appws_spec.settings.db.encryptionSecret }} namespace: {{ .Values.mas_app_namespace }} stringData: - accessSecretKey: {{ .Values.manage_attachments_access_secret_key }} + {{- range $key, $value := $.Values.global_secrets }} + {{ $key }}: {{ $value }} + {{- end }} type: Opaque {{- end }} {{- end }} +{{- end }} \ No newline at end of file diff --git a/root-applications/ibm-mas-instance-root/templates/510-550-ibm-mas-masapp-configs.yaml b/root-applications/ibm-mas-instance-root/templates/510-550-ibm-mas-masapp-configs.yaml index 22c0faee5..8d6c7eac1 100644 --- a/root-applications/ibm-mas-instance-root/templates/510-550-ibm-mas-masapp-configs.yaml +++ b/root-applications/ibm-mas-instance-root/templates/510-550-ibm-mas-masapp-configs.yaml @@ -82,8 +82,9 @@ spec: manage_logging_secret_name: {{ $value.manage_logging_secret_name }} manage_logging_access_secret_key: {{ $value.manage_logging_access_secret_key }} - manage_attachments_secret_name: {{ $value.manage_attachments_secret_name }} - manage_attachments_access_secret_key: {{ $value.manage_attachments_access_secret_key }} + {{- if $value.global_secrets }} + global_secrets: {{ $value.global_secrets | toYaml | nindent 14 }} + {{- end }} {{- end }}