diff --git a/charts/sentry/README.md b/charts/sentry/README.md index 0967cde69..70661257c 100644 --- a/charts/sentry/README.md +++ b/charts/sentry/README.md @@ -788,8 +788,15 @@ Note: this table is incomplete, so have a look at the values.yaml in case you mi | sentry.worker.existingSecretEnv | string | `""` | | | sentry.worker.livenessProbe.enabled | bool | `true` | | | sentry.worker.livenessProbe.failureThreshold | int | `3` | | +| ssentry.worker.livenessProbe.initialDelaySeconds | int | `10` | | | sentry.worker.livenessProbe.periodSeconds | int | `60` | | | sentry.worker.livenessProbe.timeoutSeconds | int | `10` | | +| sentry.worker.readinessProbe.enabled | bool | `true` | | +| sentry.worker.readinessProbe.failureThreshold | int | `3` | | +| ssentry.worker.readinessProbe.initialDelaySeconds | int | `10` | | +| sentry.worker.readinessProbe.periodSeconds | int | `60` | | +| sentry.worker.readinessProbe.timeoutSeconds | int | `10` | | +| sentry.worker.readinessProbe.celeryTimeoutSeconds | int | `5` | | | sentry.worker.nodeSelector | object | `{}` | | | sentry.worker.replicas | int | `1` | | | sentry.worker.resources | object | `{}` | | diff --git a/charts/sentry/templates/sentry/worker/deployment-sentry-worker.yaml b/charts/sentry/templates/sentry/worker/deployment-sentry-worker.yaml index 9f0833d80..d062c1128 100644 --- a/charts/sentry/templates/sentry/worker/deployment-sentry-worker.yaml +++ b/charts/sentry/templates/sentry/worker/deployment-sentry-worker.yaml @@ -132,18 +132,30 @@ spec: {{- if .Values.sentry.worker.volumeMounts }} {{ toYaml .Values.sentry.worker.volumeMounts | indent 8 }} {{- end }} - {{- if .Values.sentry.worker.livenessProbe.enabled }} +{{- if .Values.sentry.worker.livenessProbe.enabled }} livenessProbe: periodSeconds: {{ .Values.sentry.worker.livenessProbe.periodSeconds }} - initialDelaySeconds: 10 + initialDelaySeconds: {{ .Values.sentry.worker.livenessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.sentry.worker.livenessProbe.timeoutSeconds }} failureThreshold: {{ .Values.sentry.worker.livenessProbe.failureThreshold }} + exec: + command: + - rm + - -f + - /tmp/health.txt +{{- end }} +{{- if .Values.sentry.worker.readinessProbe.enabled }} + readinessProbe: + periodSeconds: {{ .Values.sentry.worker.readinessProbe.periodSeconds }} + initialDelaySeconds: {{ .Values.sentry.worker.readinessProbe.initialDelaySeconds }} + timeoutSeconds: {{ .Values.sentry.worker.readinessProbe.timeoutSeconds }} + failureThreshold: {{ .Values.sentry.worker.readinessProbe.failureThreshold }} exec: command: - sentry - exec - -c - - 'from sentry.celery import app; import os; dest="celery@{}".format(os.environ["HOSTNAME"]); print(app.control.ping(destination=[dest], timeout=5)[0][dest]["ok"])' + - 'from sentry.celery import app; import os; dest="celery@{}".format(os.environ["HOSTNAME"]); print(app.control.ping(destination=[dest], timeout={{ .Values.sentry.worker.readinessProbe.celeryTimeoutSeconds }})[0][dest]["ok"])' {{- end }} resources: {{ toYaml .Values.sentry.worker.resources | indent 12 }} diff --git a/charts/sentry/values.yaml b/charts/sentry/values.yaml index 67c33d265..23349b540 100644 --- a/charts/sentry/values.yaml +++ b/charts/sentry/values.yaml @@ -340,8 +340,17 @@ sentry: livenessProbe: enabled: true periodSeconds: 60 + initialDelaySeconds: 10 timeoutSeconds: 10 failureThreshold: 3 + readinessProbe: + enabled: true + periodSeconds: 60 + initialDelaySeconds: 10 + timeoutSeconds: 10 + failureThreshold: 3 + # time to wait for celery to respond + celeryTimeoutSeconds: 5 sidecars: [] # securityContext: {} # containerSecurityContext: {}