Skip to content

Commit

Permalink
Provide new/default values for Probes #22
Browse files Browse the repository at this point in the history
  • Loading branch information
gsautner committed Nov 22, 2023
1 parent 78e0f0f commit 6a67898
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/cryptpad/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.13
version: 0.0.14

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
26 changes: 25 additions & 1 deletion charts/cryptpad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

CryptPad is a collaboration office suite that is end-to-end-encrypted and open-source.

![Version: 0.0.13](https://img.shields.io/badge/Version-0.0.13-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.0.14](https://img.shields.io/badge/Version-0.0.14-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

## Installing the Chart

Expand Down Expand Up @@ -119,6 +119,30 @@ application_config:
| persistence.enabled | bool | `true` | Enable the persistence |
| podAnnotations | object | `{}` | Annotations for the Pod |
| podSecurityContext | object | `{"fsGroup":4001}` | Security context for the Pod |
| probes.liveness.enabled | bool | `true` | Enable liveness probe |
| probes.liveness.failureThreshold | int | `5` | Failure threshold for liveness probe |
| probes.liveness.httpGet.enabled | bool | `true` | If enabled uses httpGet to check, if false uses tcpSocket checking. |
| probes.liveness.httpGet.path | string | `"/"` | Path to be tested with HTTP GET request |
| probes.liveness.initialDelaySeconds | int | `0` | Initial delay seconds for liveness probe |
| probes.liveness.periodSeconds | int | `10` | Period seconds for liveness probe |
| probes.liveness.successThreshold | int | `1` | Success threshold for liveness probe |
| probes.liveness.timeoutSeconds | int | `1` | Timeout seconds for liveness probe |
| probes.readiness.enabled | bool | `true` | Enable readiness probe |
| probes.readiness.failureThreshold | int | `5` | Failure threshold for readiness probe |
| probes.readiness.httpGet.enabled | bool | `true` | If enabled uses httpGet to check, if false uses tcpSocket checking. |
| probes.readiness.httpGet.path | string | `"/"` | Path to be tested with HTTP GET request |
| probes.readiness.initialDelaySeconds | int | `0` | Initial delay seconds for readiness probe |
| probes.readiness.periodSeconds | int | `10` | Period seconds for readiness probe |
| probes.readiness.successThreshold | int | `1` | Success threshold for readiness probe |
| probes.readiness.timeoutSeconds | int | `1` | Timeout seconds for readiness probe |
| probes.startup.enabled | bool | `true` | Enable startup probe |
| probes.startup.failureThreshold | int | `5` | Failure threshold for startup probe |
| probes.startup.httpGet.enabled | bool | `false` | If enabled uses httpGet to check, if false uses tcpSocket checking. |
| probes.startup.httpGet.path | string | `"/"` | Path to be tested with HTTP GET request |
| probes.startup.initialDelaySeconds | int | `0` | Initial delay seconds for startup probe |
| probes.startup.periodSeconds | int | `10` | Period seconds for startup probe |
| probes.startup.successThreshold | int | `1` | Success threshold for startup probe |
| probes.startup.timeoutSeconds | int | `1` | Timeout seconds for startup probe |
| replicaCount | int | `1` | Number of replicas |
| resources | object | `{}` | Specify default resources. We usually recommend not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. |
| securityContext | object | `{}` | Security context |
Expand Down
48 changes: 44 additions & 4 deletions charts/cryptpad/templates/cryptpad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,54 @@ spec:
- name: {{ .Values.service.websocket.internalPort }}
containerPort: {{ .Values.service.websocket.containerPort }}
protocol: TCP
{{- if .Values.probes.startup.enabled }}
startupProbe:
{{- if .Values.probes.startup.httpGet.enabled }}
httpGet:
path: {{ .Values.probes.startup.httpGet.path }}
port: {{ .Values.service.containerPort }}
{{- else }}
tcpSocket:
port: {{ .Values.service.containerPort }}
{{- end }}
initialDelaySeconds: {{ .Values.probes.startup.initialDelaySeconds }}
timeoutSeconds: {{ .Values.probes.startup.timeoutSeconds }}
periodSeconds: {{ .Values.probes.startup.periodSeconds }}
failureThreshold: {{ .Values.probes.startup.failureThreshold }}
successThreshold: {{ .Values.probes.startup.successThreshold }}
{{- end }}
{{- if .Values.probes.liveness.enabled }}
livenessProbe:
{{- if .Values.probes.liveness.httpGet.enabled }}
httpGet:
path: /
port: http
path: {{ .Values.probes.liveness.httpGet.path }}
port: {{ .Values.service.containerPort }}
{{- else }}
tcpSocket:
port: {{ .Values.service.containerPort }}
{{- end }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
successThreshold: {{ .Values.probes.liveness.successThreshold }}
{{- end }}
{{- if .Values.probes.readiness.enabled }}
readinessProbe:
{{- if .Values.probes.readiness.httpGet.enabled }}
httpGet:
path: /
port: http
path: {{ .Values.probes.liveness.httpGet.path }}
port: {{ .Values.service.containerPort }}
{{- else }}
tcpSocket:
port: {{ .Values.service.containerPort }}
{{- end }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
successThreshold: {{ .Values.probes.readiness.successThreshold }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
Expand Down
55 changes: 55 additions & 0 deletions charts/cryptpad/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,58 @@ persistence:
selector: {}
dataSource: {}

probes:
startup:
# -- Enable startup probe
enabled: true
httpGet:
# -- If enabled uses httpGet to check, if false uses tcpSocket checking.
enabled: false
# -- Path to be tested with HTTP GET request
path: /
# -- Initial delay seconds for startup probe
initialDelaySeconds: 0
# -- Timeout seconds for startup probe
timeoutSeconds: 1
# -- Period seconds for startup probe
periodSeconds: 10
# -- Failure threshold for startup probe
failureThreshold: 5
# -- Success threshold for startup probe
successThreshold: 1
liveness:
# -- Enable liveness probe
enabled: true
httpGet:
# -- If enabled uses httpGet to check, if false uses tcpSocket checking.
enabled: true
# -- Path to be tested with HTTP GET request
path: /
# -- Initial delay seconds for liveness probe
initialDelaySeconds: 0
# -- Timeout seconds for liveness probe
timeoutSeconds: 1
# -- Period seconds for liveness probe
periodSeconds: 10
# -- Failure threshold for liveness probe
failureThreshold: 5
# -- Success threshold for liveness probe
successThreshold: 1
readiness:
# -- Enable readiness probe
enabled: true
httpGet:
# -- If enabled uses httpGet to check, if false uses tcpSocket checking.
enabled: true
# -- Path to be tested with HTTP GET request
path: /
# -- Initial delay seconds for readiness probe
initialDelaySeconds: 0
# -- Timeout seconds for readiness probe
timeoutSeconds: 1
# -- Period seconds for readiness probe
periodSeconds: 10
# -- Failure threshold for readiness probe
failureThreshold: 5
# -- Success threshold for readiness probe
successThreshold: 1

0 comments on commit 6a67898

Please sign in to comment.