diff --git a/os2mo/templates/orgviewer/adm/deployment.yaml b/os2mo/templates/orgviewer/adm/deployment.yaml index 507fdb4..7aeee41 100644 --- a/os2mo/templates/orgviewer/adm/deployment.yaml +++ b/os2mo/templates/orgviewer/adm/deployment.yaml @@ -59,9 +59,12 @@ spec: - name: VUE_APP_TREE_LAYOUT value: "vertical" + {{- range $name, $value := .Values.orgviewer.environment }} + - name: {{ $name }} + value: {{ $value | quote }} + {{- end }} + envFrom: - - configMapRef: - name: orgviewer-environment-config - configMapRef: name: orgviewer-adm-config ports: diff --git a/os2mo/templates/orgviewer/client-secret.yaml b/os2mo/templates/orgviewer/client-secret.yaml index 0a4b34c..5026eb2 100644 --- a/os2mo/templates/orgviewer/client-secret.yaml +++ b/os2mo/templates/orgviewer/client-secret.yaml @@ -2,6 +2,9 @@ # # SPDX-License-Identifier: MPL-2.0 {{- if or .Values.orgviewer.med.enabled .Values.orgviewer.adm.enabled }} +{{- if not (or .Values.os2mo.environment.KEYCLOAK_RBAC_ENABLED .Values.os2mo.environment.keycloak_rbac_enabled) }} + {{- fail "You cannot deploy orgviewer without enabling RBAC in os2mo." -}} +{{- end }} apiVersion: v1 kind: Secret metadata: diff --git a/os2mo/templates/orgviewer/configmap.yaml b/os2mo/templates/orgviewer/configmap.yaml deleted file mode 100644 index ab14300..0000000 --- a/os2mo/templates/orgviewer/configmap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# SPDX-FileCopyrightText: Magenta ApS -# -# SPDX-License-Identifier: MPL-2.0 ---- - -{{- if or (.Values.orgviewer.adm.enabled) (.Values.orgviewer.med.enabled) }} - {{- if not (or .Values.os2mo.environment.KEYCLOAK_RBAC_ENABLED .Values.os2mo.environment.keycloak_rbac_enabled) }} - {{- fail "You cannot deploy orgviewer without enabling RBAC in os2mo." -}} - {{- end }} -{{- end }} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: orgviewer-environment-config - {{- with .Values.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -data: -{{ toYaml .Values.orgviewer.environment | indent 2 }} diff --git a/os2mo/templates/orgviewer/med/deployment.yaml b/os2mo/templates/orgviewer/med/deployment.yaml index 310deba..e9d3565 100644 --- a/os2mo/templates/orgviewer/med/deployment.yaml +++ b/os2mo/templates/orgviewer/med/deployment.yaml @@ -59,9 +59,12 @@ spec: - name: VUE_APP_TREE_LAYOUT value: "vertical" + {{- range $name, $value := .Values.orgviewer.environment }} + - name: {{ $name }} + value: {{ $value | quote }} + {{- end }} + envFrom: - - configMapRef: - name: orgviewer-environment-config - configMapRef: name: orgviewer-med-config ports: