diff --git a/charts/apollo/Chart.yaml b/charts/apollo/Chart.yaml index 4b33048..8e4d0cb 100644 --- a/charts/apollo/Chart.yaml +++ b/charts/apollo/Chart.yaml @@ -16,7 +16,7 @@ maintainers: url: https://github.com/dellnoantechnp/helm-chart-xxl-job-admin name: apollo type: application -version: 0.8.1 +version: 0.8.2 dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts diff --git a/charts/apollo/templates/portal/configmap-portal.yaml b/charts/apollo/templates/portal/configmap-portal.yaml index 536c3f3..0a5f8c7 100644 --- a/charts/apollo/templates/portal/configmap-portal.yaml +++ b/charts/apollo/templates/portal/configmap-portal.yaml @@ -3,6 +3,7 @@ kind: ConfigMap apiVersion: v1 metadata: {{- $portalFullName := include "apollo.portal.fullName" . }} + {{- $serviceUrl := include "apollo.configService.serviceUrl" . }} name: {{ $portalFullName }} data: application-github.properties: | @@ -19,9 +20,17 @@ data: {{- range $env, $address := .Values.portal.config.metaServers }} {{ $env }}.meta = {{ $address }} {{- end }} + {{- if not .Values.portal.config.metaServers }} - {{ .Values.portal.config.envs }}: {{ include "apollo.configService.serviceUrl" . }}{{ .Values.configService.config.contextPath }} + {{- if contains "," .Values.portal.config.envs }} + {{- range $index, $env := (regexSplit "," .Values.portal.config.envs -1) }} + {{ $env }} = {{ $serviceUrl }}{{ $.Values.configService.config.contextPath }} {{- end }} + {{- else }} + {{ .Values.portal.config.envs }} = {{ $serviceUrl }}{{ .Values.configService.config.contextPath }} + {{- end }} + {{- end }} + {{- range $fileName, $content := .Values.portal.config.files }} {{ $fileName | nindent 4 }}: | {{ $content | nindent 4 }}