apache / apache/devlake-helm-chart

Dynamic replica management using replicaCount to enable or disable DEV-LAKE.

Open
#266 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go Template
Stars
52
Forks
72
Avg merge
21h 4m
Merged PRs (30d)
1

Description

Knowing that the _dev-lake_ deployments cannot have more than one replica, we would like to have the ability to manage the replicas of **[StatefulSet](https://github.com/apache/incubator-devlake-helm-chart/blob/main/charts/devlake/templates/statefulsets.yaml)** and **[deployments](https://github.com/apache/incubator-devlake-helm-chart/blob/main/charts/devlake/templates/deployments.yaml)** to set to 0, and then completely disable **_devlake-helm-chart_**.

Current configuration:
```
spec:
replicas: 1
```

Changes for **[StatefulSet](https://github.com/apache/incubator-devlake-helm-chart/blob/main/charts/devlake/templates/statefulsets.yaml)** and **[deployments](https://github.com/apache/incubator-devlake-helm-chart/blob/main/charts/devlake/templates/deployments.yaml)** :
```
spec:
replicas: {{ if gt .Values.replicaCount 1 }}1{{ else }}{{ .Values.replicaCount }}{{ end }}
```

---
_If you find it convenient:_

Changes for [StatefulSet](https://github.com/apache/incubator-devlake-helm-chart/blob/07d40056935b7ffc03621a7a294cfcdf0435f3d9/charts/devlake/templates/statefulsets.yaml#L28C3-L28C14) and [Deployment (**devlake-ui**)](https://github.com/apache/incubator-devlake-helm-chart/blob/07d40056935b7ffc03621a7a294cfcdf0435f3d9/charts/devlake/templates/deployments.yaml#L29)
```
spec:
replicas: {{ .Values.replicaCount }}
```

Change for [Deployment (**dev-lake**)](https://github.com/apache/incubator-devlake-helm-chart/blob/07d40056935b7ffc03621a7a294cfcdf0435f3d9/charts/devlake/templates/deployments.yaml#L129)
```
spec:
replicas: {{ if gt .Values.replicaCount 1 }}1{{ else }}{{ .Values.replicaCount }}{{ end }}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.