Skip to content

Commit d182ebd

Browse files
Enabled replicaCount (#269)
* Enabled replicaCount * pullrequestreview-1972726168 * Update deployments.yaml Fix: incompatible types for comparison * Update statefulsets.yaml Fix: incompatible types for comparison * Update values.yaml keeping the same as main branch --------- Co-authored-by: Angel Sanchez <angel.sanchez@r2capital.co>
1 parent 4a3c8c5 commit d182ebd

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

HelmSetup.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,11 @@ Some useful parameters for the chart, you could also check them in values.yaml
143143

144144
| Parameter | Description | Default |
145145
| -------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------ |
146-
| replicaCount | Replica Count for devlake, currently not used | 1 |
146+
| replicaCount | Replica Count for devlake, currently not used (removed) | 1 |
147147
| imageTag | The version tag for all images | see Values.yaml |
148148
| imagePullSecrets | Name of the Secret for accessing private image registries | [] |
149149
| commonEnvs | The common envs for all pods except grafana | {TZ: "UTC"} |
150+
| mysql.replicaCount | Replica count can only be 0 or 1 | 1 |
150151
| mysql.useExternal | If use external mysql server, set true | false |
151152
| mysql.externalServer | External mysql server address | 127.0.0.1 |
152153
| mysql.externalPort | External mysql server port | 3306 |
@@ -168,6 +169,7 @@ Some useful parameters for the chart, you could also check them in values.yaml
168169
| mysql.service.type | mysql service type | ClusterIP |
169170
| mysql.service.nodePort | specify mysql nodeport | "" |
170171
| grafana | dashboard, datasource, etc. settings for grafana, installed by grafana official chart | |
172+
| lake.replicaCount | Replica count can only be 0 or 1 | 1 |
171173
| lake.image.repository | repository for lake's image | apache/devlake |
172174
| lake.image.pullPolicy | pullPolicy for lake's image | Always |
173175
| lake.port | the port of devlake backend | 8080 |
@@ -183,6 +185,7 @@ Some useful parameters for the chart, you could also check them in values.yaml
183185
| lake.livenessProbe | container livenessprobe | see Values.yaml |
184186
| lake.readinessProbe | container readinessProbe | see Values.yaml |
185187
| lake.deployment.extraLabels | extra labels for lake's deployment metadata | {} |
188+
| ui.replicaCount | Replica count for ui | 1 |
186189
| ui.image.repository | repository for ui's image | apache/devlake-config-ui |
187190
| ui.image.pullPolicy | pullPolicy for ui's image | Always |
188191
| ui.basicAuth.enabled | If the basic auth in ui is enabled | false |

charts/devlake/templates/deployments.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ metadata:
2626
{{- toYaml . | nindent 4 }}
2727
{{- end }}
2828
spec:
29-
replicas: 1
29+
replicas: {{ .Values.ui.replicaCount }}
3030
{{- with .Values.ui.strategy }}
3131
strategy:
3232
{{- toYaml . | nindent 4 }}
@@ -129,7 +129,7 @@ metadata:
129129
{{- toYaml . | nindent 4 }}
130130
{{- end }}
131131
spec:
132-
replicas: 1
132+
replicas: {{ if gt (int .Values.lake.replicaCount) 1 }}1{{ else }}{{ .Values.lake.replicaCount }}{{ end }}
133133
{{- with .Values.lake.strategy }}
134134
strategy:
135135
{{- toYaml . | nindent 4 }}

charts/devlake/templates/statefulsets.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ metadata:
2525
labels:
2626
{{- include "devlake.labels" . | nindent 4 }}
2727
spec:
28-
replicas: 1
28+
replicas: {{ if gt (int .Values.mysql.replicaCount) 1 }}1{{ else }}{{ .Values.mysql.replicaCount }}{{ end }}
2929
serviceName: {{ include "devlake.fullname" . }}-mysql
3030
selector:
3131
matchLabels:

charts/devlake/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ commonEnvs:
2727
TZ: "UTC"
2828

2929
mysql:
30+
replicaCount: 1
3031
# if use external mysql server, please set true
3132
# by default using false, chart will create a single mysql instance
3233
useExternal: false
@@ -175,6 +176,7 @@ grafana:
175176
ingressServicePort: ""
176177

177178
lake:
179+
replicaCount: 1
178180
image:
179181
repository: devlake.docker.scarf.sh/apache/devlake
180182
pullPolicy: Always
@@ -275,6 +277,7 @@ lake:
275277
volumeMounts: []
276278

277279
ui:
280+
replicaCount: 1
278281
image:
279282
repository: devlake.docker.scarf.sh/apache/devlake-config-ui
280283
pullPolicy: Always

0 commit comments

Comments
 (0)