From e221a9cb6e9e9c50b5fa8b71310e9b0e4c4e4cc9 Mon Sep 17 00:00:00 2001 From: Angel Sanchez Date: Mon, 1 Apr 2024 17:50:15 -0400 Subject: [PATCH 1/2] Enabled replicaCount --- charts/devlake/templates/deployments.yaml | 4 ++-- charts/devlake/templates/statefulsets.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/devlake/templates/deployments.yaml b/charts/devlake/templates/deployments.yaml index 197476c..e2d8cf1 100644 --- a/charts/devlake/templates/deployments.yaml +++ b/charts/devlake/templates/deployments.yaml @@ -26,7 +26,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - replicas: 1 + replicas: {{ .Values.replicaCount }} {{- with .Values.ui.strategy }} strategy: {{- toYaml . | nindent 4 }} @@ -126,7 +126,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - replicas: 1 + replicas: {{ if gt .Values.replicaCount 1 }}1{{ else }}{{ .Values.replicaCount }}{{ end }} {{- with .Values.lake.strategy }} strategy: {{- toYaml . | nindent 4 }} diff --git a/charts/devlake/templates/statefulsets.yaml b/charts/devlake/templates/statefulsets.yaml index 005e5bb..3e17048 100644 --- a/charts/devlake/templates/statefulsets.yaml +++ b/charts/devlake/templates/statefulsets.yaml @@ -25,7 +25,7 @@ metadata: labels: {{- include "devlake.labels" . | nindent 4 }} spec: - replicas: 1 + replicas: {{ .Values.replicaCount }} serviceName: {{ include "devlake.fullname" . }}-mysql selector: matchLabels: From 47b06b72798d1dcb7e228ed382f7cd1c4683dfa9 Mon Sep 17 00:00:00 2001 From: Angel Sanchez Date: Tue, 9 Apr 2024 11:13:59 -0400 Subject: [PATCH 2/2] pullrequestreview-1972726168 --- HelmSetup.md | 5 ++++- charts/devlake/templates/deployments.yaml | 4 ++-- charts/devlake/templates/statefulsets.yaml | 2 +- charts/devlake/values.yaml | 7 +++++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/HelmSetup.md b/HelmSetup.md index 679e62a..2987a9d 100644 --- a/HelmSetup.md +++ b/HelmSetup.md @@ -144,10 +144,11 @@ Some useful parameters for the chart, you could also check them in values.yaml | Parameter | Description | Default | | -------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------ | -| replicaCount | Replica Count for devlake, currently not used | 1 | +| replicaCount | Replica Count for devlake, currently not used (removed) | 1 | | imageTag | The version tag for all images | see Values.yaml | | imagePullSecrets | Name of the Secret for accessing private image registries | [] | | commonEnvs | The common envs for all pods except grafana | {TZ: "UTC"} | +| mysql.replicaCount | Replica count can only be 0 or 1 | 1 | | mysql.useExternal | If use external mysql server, set true | false | | mysql.externalServer | External mysql server address | 127.0.0.1 | | mysql.externalPort | External mysql server port | 3306 | @@ -169,6 +170,7 @@ Some useful parameters for the chart, you could also check them in values.yaml | mysql.service.type | mysql service type | ClusterIP | | mysql.service.nodePort | specify mysql nodeport | "" | | grafana | dashboard, datasource, etc. settings for grafana, installed by grafana official chart | | +| lake.replicaCount | Replica count can only be 0 or 1 | 1 | | lake.image.repository | repository for lake's image | apache/devlake | | lake.image.pullPolicy | pullPolicy for lake's image | Always | | lake.port | the port of devlake backend | 8080 | @@ -184,6 +186,7 @@ Some useful parameters for the chart, you could also check them in values.yaml | lake.livenessProbe | container livenessprobe | see Values.yaml | | lake.readinessProbe | container readinessProbe | see Values.yaml | | lake.deployment.extraLabels | extra labels for lake's deployment metadata | {} | +| ui.replicaCount | Replica count for ui | 1 | | ui.image.repository | repository for ui's image | apache/devlake-config-ui | | ui.image.pullPolicy | pullPolicy for ui's image | Always | | ui.basicAuth.enabled | If the basic auth in ui is enabled | false | diff --git a/charts/devlake/templates/deployments.yaml b/charts/devlake/templates/deployments.yaml index e2d8cf1..f985d26 100644 --- a/charts/devlake/templates/deployments.yaml +++ b/charts/devlake/templates/deployments.yaml @@ -26,7 +26,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.ui.replicaCount }} {{- with .Values.ui.strategy }} strategy: {{- toYaml . | nindent 4 }} @@ -126,7 +126,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - replicas: {{ if gt .Values.replicaCount 1 }}1{{ else }}{{ .Values.replicaCount }}{{ end }} + replicas: {{ if gt .Values.lake.replicaCount 1 }}1{{ else }}{{ .Values.lake.replicaCount }}{{ end }} {{- with .Values.lake.strategy }} strategy: {{- toYaml . | nindent 4 }} diff --git a/charts/devlake/templates/statefulsets.yaml b/charts/devlake/templates/statefulsets.yaml index 3e17048..9a6960c 100644 --- a/charts/devlake/templates/statefulsets.yaml +++ b/charts/devlake/templates/statefulsets.yaml @@ -25,7 +25,7 @@ metadata: labels: {{- include "devlake.labels" . | nindent 4 }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ if gt .Values.mysql.replicaCount 1 }}1{{ else }}{{ .Values.mysql.replicaCount }}{{ end }} serviceName: {{ include "devlake.fullname" . }}-mysql selector: matchLabels: diff --git a/charts/devlake/values.yaml b/charts/devlake/values.yaml index 93babbd..dce1fa3 100644 --- a/charts/devlake/values.yaml +++ b/charts/devlake/values.yaml @@ -15,8 +15,8 @@ # limitations under the License. # -# replica count -replicaCount: 1 +# global replica count was removed + imageTag: v1.0.0-beta3 # image pull secrets @@ -27,6 +27,7 @@ commonEnvs: TZ: "UTC" mysql: + replicaCount: 1 # if use external mysql server, please set true # by default using false, chart will create a single mysql instance useExternal: false @@ -168,6 +169,7 @@ grafana: ingressServicePort: "" lake: + replicaCount: 1 image: repository: devlake.docker.scarf.sh/apache/devlake pullPolicy: Always @@ -242,6 +244,7 @@ lake: extraLabels: {} ui: + replicaCount: 1 image: repository: devlake.docker.scarf.sh/apache/devlake-config-ui pullPolicy: Always