Skip to content

Commit

Permalink
Add PLATFORM_APISERVER_DOMAIN env for grafana, platform-ui charts
Browse files Browse the repository at this point in the history
Signed-off-by: Masudur Rahman <[email protected]>
  • Loading branch information
masudur-rahman committed Dec 21, 2023
1 parent ef9932c commit 90f4ec4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/grafana/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,7 @@ Returns the ServiceMonitor labels
{{- define "settings.natsSecretName" -}}
{{- .Values.settings.secretName.nats -}}
{{- end }}

{{- define "b3.platformAPIServer" -}}
{{- printf "http://%s-platform-api.%s.svc" .Release.Name .Release.Namespace -}}
{{- end }}
2 changes: 2 additions & 0 deletions charts/grafana/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ spec:
env:
- name: GF_PATHS_CONFIG
value: /conf/defaults.ini
- name: PLATFORM_APISERVER_DOMAIN
value: {{ include "b3.platformAPIServer" }}
volumeMounts:
- mountPath: /var/lib/grafana
name: data
Expand Down
4 changes: 4 additions & 0 deletions charts/platform-ui/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@ imagePullSecrets:
{{- define "settings.caProviderClass" -}}
{{- .Values.settings.caProviderClass -}}
{{- end }}

{{- define "b3.platformAPIServer" -}}
{{- printf "http://%s-platform-api.%s.svc" .Release.Name .Release.Namespace -}}
{{- end }}
2 changes: 2 additions & 0 deletions charts/platform-ui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ spec:
- name: PLATFORM_DOMAIN
value: {{ . }}
{{- end }}
- name: PLATFORM_APISERVER_DOMAIN
value: {{ include "b3.platformAPIServer" }}
# ref: https://github.com/axios/axios/issues/535#issuecomment-262299969
# ref: https://stackoverflow.com/a/56406725
{{- if (include "settings.caProviderClass" .) }}
Expand Down

0 comments on commit 90f4ec4

Please sign in to comment.