Skip to content

Commit

Permalink
feat(deployment): make liveness and readiness probes configurable and…
Browse files Browse the repository at this point in the history
… provide sensible default values
  • Loading branch information
hnicke authored and nijel committed Jul 4, 2023
1 parent 1d0f096 commit d962b42
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/weblate/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ appVersion: 4.18.2.1
description: Weblate is a free web-based translation management system.
name: weblate
type: application
version: 0.4.29
version: 0.4.30
home: https://weblate.org/
icon: https://s.weblate.org/cdn/weblate.svg
maintainers:
Expand Down
8 changes: 7 additions & 1 deletion charts/weblate/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# weblate

![Version: 0.4.29](https://img.shields.io/badge/Version-0.4.29-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.18.2.1](https://img.shields.io/badge/AppVersion-4.18.2.1-informational?style=flat-square)
![Version: 0.4.30](https://img.shields.io/badge/Version-0.4.30-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.18.2.1](https://img.shields.io/badge/AppVersion-4.18.2.1-informational?style=flat-square)

Weblate is a free web-based translation management system.

Expand Down Expand Up @@ -68,6 +68,9 @@ $ helm install my-release weblate/weblate
| ingress.tls | list | `[]` | |
| initContainers | list | `[]` | List of init containers to add to the pod. Values will be evaluated as Helm templates |
| labels | object | `{}` | custom labels |
| livenessProbe.failureThreshold | int | `10` | |
| livenessProbe.initialDelaySeconds | int | `300` | |
| livenessProbe.periodSeconds | int | `30` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| persistence.accessMode | string | `"ReadWriteOnce"` | |
Expand All @@ -86,6 +89,9 @@ $ helm install my-release weblate/weblate
| postgresql.enabled | bool | `true` | |
| postgresql.postgresqlHost | string | `None` | External postgres database endpoint, to be used if `postgresql.enabled == false` |
| postgresql.service.ports.postgresql | int | `5432` | |
| readinessProbe.failureThreshold | int | `2` | |
| readinessProbe.initialDelaySeconds | int | `60` | |
| readinessProbe.periodSeconds | int | `30` | |
| redis.architecture | string | `"standalone"` | |
| redis.auth.enabled | bool | `true` | |
| redis.auth.existingSecret | string | `""` | |
Expand Down
20 changes: 12 additions & 8 deletions charts/weblate/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,24 @@ spec:
name: {{ .Values.externalSecretName }}
{{- end }}
{{- end }}
{{- with .Values.livenessProbe }}
livenessProbe:
httpGet:
path: {{ .Values.sitePrefix }}/healthz/
path: {{ $.Values.sitePrefix }}/healthz/
port: http
failureThreshold: 10
initialDelaySeconds: 300
periodSeconds: 30
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
periodSeconds: {{ .periodSeconds }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe:
httpGet:
path: {{ .Values.sitePrefix }}/healthz/
path: {{ $.Values.sitePrefix }}/healthz/
port: http
failureThreshold: 5
initialDelaySeconds: 300
periodSeconds: 30
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
periodSeconds: {{ .periodSeconds }}
{{- end }}
volumeMounts:
- mountPath: {{ .Values.persistence.filestore_dir }}
name: weblate-data
Expand Down
10 changes: 10 additions & 0 deletions charts/weblate/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@ tolerations: []

affinity: {}

livenessProbe:
initialDelaySeconds: 300
periodSeconds: 30
failureThreshold: 10

readinessProbe:
initialDelaySeconds: 60
periodSeconds: 30
failureThreshold: 2

postgresql:
auth:
# PostgreSQL user should be a superuser to
Expand Down

0 comments on commit d962b42

Please sign in to comment.