matrixji commented on code in PR #1999:
URL: https://github.com/apache/incubator-devlake/pull/1999#discussion_r887558436
##########
deployment/helm/templates/deployments.yaml:
##########
@@ -0,0 +1,82 @@
+---
+# grafana
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "devlake.fullname" . }}-grafana
+ labels:
+ {{- include "devlake.labels" . | nindent 4 }}
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ {{- include "devlake.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ labels:
+ {{- include "devlake.selectorLabels" . | nindent 8 }}
+ devlakeComponent: grafana
+ spec:
+ containers:
+ - name: {{ .Chart.Name }}-grafana
+ image: "{{ .Values.grafana.image.repository }}:{{
.Values.grafana.image.tag }}"
+ imagePullPolicy: {{ .Values.grafana.image.pullPolicy }}
+ ports:
+ - containerPort: 3000
+ livenessProbe:
+ httpGet:
+ path: /api/health
+ port: 3000
+ initialDelaySeconds: 30
+ timeoutSeconds: 30
+ envFrom:
+ - configMapRef:
+ name: {{ include "devlake.fullname" . }}-config
+ env:
+ - name: GF_USERS_ALLOW_SIGN_UP
+ value: 'false'
+ - name: GF_DASHBOARDS_JSON_ENABLED
+ value: 'true'
+ - name: GF_LIVE_ALLOWED_ORIGINS
+ value: '*'
+ - name: MYSQL_URL
+ value: {{ include "devlake.fullname" . }}-mysql:3306
+
+---
+# devlake-ui
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "devlake.fullname" . }}-ui
+ labels:
+ {{- include "devlake.labels" . | nindent 4 }}
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ {{- include "devlake.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ labels:
+ {{- include "devlake.selectorLabels" . | nindent 8 }}
+ devlakeComponent: ui
+ spec:
+ containers:
+ - name: {{ .Chart.Name }}-ui
+ image: "{{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag }}"
+ imagePullPolicy: {{ .Values.ui.image.pullPolicy }}
+ ports:
+ - containerPort: 80
+ envFrom:
+ - configMapRef:
+ name: {{ include "devlake.fullname" . }}-config
+ env:
+ - name: DEVLAKE_ENDPOINT
+ # TODO: remove hardcoded `cluster.local`
+ value: {{ include "devlake.fullname" . }}-lake.{{
.Release.Namespace }}.svc.cluster.local:8080
+ - name: GRAFANA_ENDPOINT
Review Comment:
Yes, fixed. Currently introducing a parameter for it. And later I add
ingress support and will overwrite it with ingress's endpoint when ingress is
configured.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]