Skip to content

Commit

Permalink
adjust to v0.18.0-beta6 and unify timezone (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangNing10 authored Aug 18, 2023
1 parent d032e65 commit 63a7f4f
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 21 deletions.
6 changes: 3 additions & 3 deletions HelmSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To install the chart with release name `devlake`:
helm repo add devlake https://apache.github.io/incubator-devlake-helm-chart
helm repo update
ENCRYPTION_SECRET=$(openssl rand -base64 2000 | tr -dc 'A-Z' | fold -w 128 | head -n 1)
helm install devlake devlake/devlake --version=0.18.0-beta5 --set lake.encryptionSecret.secret=$ENCRYPTION_SECRET
helm install devlake devlake/devlake --version=0.18.0-beta6 --set lake.encryptionSecret.secret=$ENCRYPTION_SECRET
```

Visit your devlake from the node port (32001 by default): http://YOUR-NODE-IP:32001.
Expand All @@ -49,14 +49,14 @@ _Notes for mac users with minikube:_
```shell
helm repo update
helm upgrade devlake devlake/devlake --version=0.18.0-beta5 --set lake.encryptionSecret.secret=<ENCRYPTION_SECRET>
helm upgrade devlake devlake/devlake --version=0.18.0-beta6 --set lake.encryptionSecret.secret=<ENCRYPTION_SECRET>
```

**If you're upgrading from DevLake v0.18.x or later versions:**

```shell
helm repo update
helm upgrade devlake devlake/devlake --version=0.18.0-beta5
helm upgrade devlake devlake/devlake --version=0.18.0-beta6
```

### 2.3 Uninstall
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ helm install devlake devlake/devlake
helm repo add devlake https://apache.github.io/incubator-devlake-helm-chart
helm repo update
ENCRYPTION_SECRET=$(openssl rand -base64 2000 | tr -dc 'A-Z' | fold -w 128 | head -n 1)
helm install devlake devlake/devlake --version=0.18.0-beta5 --set lake.encryptionSecret.secret=$ENCRYPTION_SECRET
helm install devlake devlake/devlake --version=0.18.0-beta6 --set lake.encryptionSecret.secret=$ENCRYPTION_SECRET
```

If you are using minikube inside your mac, please use the following command to forward the port:
Expand Down Expand Up @@ -70,14 +70,14 @@ grafana by url `http://YOUR-NODE-IP:30091`
```shell
helm repo update
helm upgrade devlake devlake/devlake --version=0.18.0-beta5 --set lake.encryptionSecret.secret=<ENCRYPTION_SECRET>
helm upgrade devlake devlake/devlake --version=0.18.0-beta6 --set lake.encryptionSecret.secret=<ENCRYPTION_SECRET>
```

**If you're upgrading from DevLake v0.18.x or later versions:**

```shell
helm repo update
helm upgrade devlake devlake/devlake --version=0.18.0-beta5
helm upgrade devlake devlake/devlake --version=0.18.0-beta6
```

## Uninstall
Expand Down
4 changes: 2 additions & 2 deletions charts/devlake/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ keywords:
type: application

# Chart version
version: 0.18.0-beta5
version: 0.18.0-beta6

# devlake version
appVersion: v0.18.0-beta5
appVersion: v0.18.0-beta6

dependencies:
- condition: grafana.enabled
Expand Down
2 changes: 1 addition & 1 deletion charts/devlake/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ The database url
*/}}
{{- define "database.url" -}}
{{- if eq .Values.option.database "mysql" -}}
mysql://{{ .Values.mysql.username }}:{{ .Values.mysql.password }}@{{ include "mysql.server" . }}:{{ include "mysql.port" . }}/{{ .Values.mysql.database }}?charset=utf8mb4&parseTime=True
mysql://{{ .Values.mysql.username }}:{{ .Values.mysql.password }}@{{ include "mysql.server" . }}:{{ include "mysql.port" . }}/{{ .Values.mysql.database }}?charset=utf8mb4&parseTime=True&loc={{ .Values.envs.TZ }}
{{- end }}
{{- end }}

Expand Down
12 changes: 7 additions & 5 deletions charts/devlake/templates/deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ spec:
- name: GRAFANA_ENDPOINT
value: {{ .Release.Name }}-grafana.{{ .Release.Namespace }}.svc.cluster.local:80
{{- end }}
{{- with .Values.envs }}
{{- toYaml . | nindent 12 }}
{{- range $key, $value := .Values.envs }}
- name: "{{ tpl $key $ }}"
value: "{{ tpl (print $value) $ }}"
{{- end }}
{{- with .Values.ui.resources }}
resources:
Expand Down Expand Up @@ -151,9 +152,10 @@ spec:
{{- with .Values.lake.envs }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.envs }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- range $key, $value := .Values.envs }}
- name: "{{ tpl $key $ }}"
value: "{{ tpl (print $value) $ }}"
{{- end }}
{{- with .Values.lake.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
7 changes: 4 additions & 3 deletions charts/devlake/templates/statefulsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ spec:
envFrom:
- secretRef:
name: {{ include "devlake.mysql.secret" . }}
{{- with .Values.envs }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- range $key, $value := .Values.envs }}
- name: "{{ tpl $key $ }}"
value: "{{ tpl (print $value) $ }}"
{{- end }}
volumeMounts:
- mountPath: /var/lib/mysql
name: {{ include "devlake.fullname" . }}-mysql-data
Expand Down
10 changes: 6 additions & 4 deletions charts/devlake/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@

# replica count for dev
replicaCount: 1
imageTag: v0.18.0-beta5
imageTag: v0.18.0-beta6

#the common environments for all pods
envs:
- name: TZ
value: "UTC"
TZ: "UTC"

mysql:
# if use external mysql server, please set true
Expand Down Expand Up @@ -134,13 +133,16 @@ grafana:
url: ""
image:
repository: devlake.docker.scarf.sh/apache/devlake-dashboard
tag: v0.18.0-beta5
tag: v0.18.0-beta6
grafana.ini:
server:
root_url: "%(protocol)s://%(domain)s/grafana"
#the secret name should be as same as .Values.option.connectionSecretName
envFromSecrets:
- name: "devlake-mysql-auth"
#keep grafana timezone same as other pods, which is set by .Values.envs.TZ
env:
TZ: "UTC"

lake:
image:
Expand Down

0 comments on commit 63a7f4f

Please sign in to comment.