This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-devlake-helm-chart.git
The following commit(s) were added to refs/heads/main by this push:
new 19c77c9 refactor: adopt USE_EXTERNAL_GRAFANA instead of mounting
`default.con… (#117)
19c77c9 is described below
commit 19c77c9e20204139185ea1ea28bfdc9b3dc3b012
Author: Klesh Wong <[email protected]>
AuthorDate: Mon Apr 24 09:09:50 2023 +0800
refactor: adopt USE_EXTERNAL_GRAFANA instead of mounting `default.con…
(#117)
* refactor: adopt USE_EXTERNAL_GRAFANA instead of mounting
`default.conf.tpl`
* fix: nginx-conf-config should be removed
---
charts/devlake/templates/configmaps.yaml | 45 -------------------------------
charts/devlake/templates/deployments.yaml | 8 ++----
2 files changed, 2 insertions(+), 51 deletions(-)
diff --git a/charts/devlake/templates/configmaps.yaml
b/charts/devlake/templates/configmaps.yaml
index 1138835..a5a8776 100644
--- a/charts/devlake/templates/configmaps.yaml
+++ b/charts/devlake/templates/configmaps.yaml
@@ -37,51 +37,6 @@ data:
ADMIN_PASS: "{{ .Values.ui.basicAuth.password }}"
{{- end }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "devlake.fullname" . }}-nginx-conf
-data:
- default.conf.tpl: |
- server {
- listen 4000;
- server_name localhost;
- ${SERVER_CONF}
-
- location / {
- root /usr/share/nginx/html;
- index index.html;
- try_files $uri /index.html;
- }
-
- location /api/ {
- resolver ${DNS} valid=${DNS_VALID};
- resolver_timeout 3s;
- set $target "${DEVLAKE_ENDPOINT}";
- rewrite /api/(.*) /$1 break;
- proxy_send_timeout 10s;
- proxy_read_timeout 10s;
- proxy_pass http://$target;
- }
-{{- if .Values.grafana.useExternal }}
- location /grafana/ {
- return 302 ${GRAFANA_ENDPOINT};
- }
-{{- else }}
- location /grafana/ {
- resolver ${DNS} valid=${DNS_VALID};
- resolver_timeout 3s;
- set $target "${GRAFANA_ENDPOINT}";
- rewrite /grafana/(.*) /$1 break;
- proxy_set_header Authorization "";
- proxy_send_timeout 10s;
- proxy_read_timeout 10s;
- proxy_pass http://$target;
- }
-{{- end }}
- }
-
---
{{- if not .Values.grafana.useExternal }}
apiVersion: v1
diff --git a/charts/devlake/templates/deployments.yaml
b/charts/devlake/templates/deployments.yaml
index e1b3616..346e793 100644
--- a/charts/devlake/templates/deployments.yaml
+++ b/charts/devlake/templates/deployments.yaml
@@ -128,6 +128,8 @@ spec:
{{- if .Values.grafana.useExternal }}
- name: GRAFANA_ENDPOINT
value: {{ .Values.grafana.externalUrl }}
+ - name: USE_EXTERNAL_GRAFANA
+ value: "true"
{{- else }}
- name: GRAFANA_ENDPOINT
value: {{ include "devlake.fullname" . }}-grafana.{{
.Release.Namespace }}.svc.cluster.local:3000
@@ -138,9 +140,6 @@ spec:
mountPath: /etc/localtime
readOnly: true
{{- end }}
- - name: {{ include "devlake.fullname" . }}-nginx-conf-config
- mountPath: /etc/nginx/conf.d/default.conf.tpl
- subPath: default.conf.tpl
{{- with .Values.ui.resources }}
resources:
{{- toYaml . | nindent 12 }}
@@ -164,6 +163,3 @@ spec:
path: {{ .Values.option.localtime }}
type: File
{{- end }}
- - name: {{ include "devlake.fullname" . }}-nginx-conf-config
- configMap:
- name: {{ include "devlake.fullname" . }}-nginx-conf