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 d182ebd  Enabled replicaCount (#269)
d182ebd is described below

commit d182ebd127a484f74157aaefa2aa215a06edbcd6
Author: Angel Sanchez <[email protected]>
AuthorDate: Tue Jul 29 23:02:20 2025 -0400

    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 <[email protected]>
---
 HelmSetup.md                               | 5 ++++-
 charts/devlake/templates/deployments.yaml  | 4 ++--
 charts/devlake/templates/statefulsets.yaml | 2 +-
 charts/devlake/values.yaml                 | 3 +++
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/HelmSetup.md b/HelmSetup.md
index f959621..abf50d2 100644
--- a/HelmSetup.md
+++ b/HelmSetup.md
@@ -143,10 +143,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                     |
@@ -168,6 +169,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                     |
@@ -183,6 +185,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 a93f029..903037e 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.ui.replicaCount }}
   {{- with .Values.ui.strategy }}
   strategy:
     {{- toYaml . | nindent 4 }}
@@ -129,7 +129,7 @@ metadata:
   {{- toYaml . | nindent 4 }}
   {{- end }}
 spec:
-  replicas: 1
+  replicas: {{ if gt (int .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 e15176d..477f6db 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: {{ if gt (int .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 8ce8814..46a5910 100644
--- a/charts/devlake/values.yaml
+++ b/charts/devlake/values.yaml
@@ -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
@@ -175,6 +176,7 @@ grafana:
   ingressServicePort: ""
 
 lake:
+  replicaCount: 1
   image:
     repository: devlake.docker.scarf.sh/apache/devlake
     pullPolicy: Always
@@ -275,6 +277,7 @@ lake:
   volumeMounts: []
 
 ui:
+  replicaCount: 1
   image:
     repository: devlake.docker.scarf.sh/apache/devlake-config-ui
     pullPolicy: Always

Reply via email to