Skip to content

Make probe thresholds and frequencies explicit #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions charts/matrix-stack/source/common/sub_schema_values.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright 2024 New Vector Ltd
Copyright 2024-2025 New Vector Ltd

SPDX-License-Identifier: AGPL-3.0-only
#}
Expand Down Expand Up @@ -276,7 +276,8 @@ labels: {}
{{ (credential("PostgreSQL password", "password", commented=True) | indent(2)) }}
{%- endmacro %}

{% macro probe(type, failureThreshold=none, initialDelaySeconds=none, periodSeconds=none, successThreshold=none, timeoutSeconds=none) %}
{# The default values are the k8s defaults. We could omit but lets make them explicit. #}
{% macro probe(type, failureThreshold=3, initialDelaySeconds=0, periodSeconds=10, successThreshold=1, timeoutSeconds=1) %}
## Configuration of the thresholds and frequencies of the {{ type }}Probe
{%- if failureThreshold is none and initialDelaySeconds is none and periodSeconds is none and successThreshold is none and timeoutSeconds is none %}
# {{ type }}Probe:
Expand Down
6 changes: 3 additions & 3 deletions charts/matrix-stack/source/element-web.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ replicas: 1
{{- sub_schema_values.serviceAccount() -}}
{{- sub_schema_values.tolerations() -}}
{{- sub_schema_values.topologySpreadConstraints() }}
{{- sub_schema_values.probe("liveness", failureThreshold=3, periodSeconds=10) }}
{{- sub_schema_values.probe("readiness", failureThreshold=3, periodSeconds=3) }}
{{- sub_schema_values.probe("startup", failureThreshold=3, initialDelaySeconds=2, periodSeconds=3) }}
{{- sub_schema_values.probe("liveness") }}
{{- sub_schema_values.probe("readiness", periodSeconds=3) }}
{{- sub_schema_values.probe("startup", initialDelaySeconds=2, periodSeconds=3) }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright 2024 New Vector Ltd
Copyright 2024-2025 New Vector Ltd

SPDX-License-Identifier: AGPL-3.0-only
#}
Expand Down Expand Up @@ -42,6 +42,6 @@ privateKeys:
{{ sub_schema_values.workloadAnnotations() }}
{{ sub_schema_values.serviceMonitors() }}
{{ sub_schema_values.extraEnv() }}
{{ sub_schema_values.probe("liveness", failureThreshold=3) }}
{{ sub_schema_values.probe("readiness", failureThreshold=3) }}
{{ sub_schema_values.probe("liveness") }}
{{ sub_schema_values.probe("readiness") }}
{{ sub_schema_values.probe("startup", initialDelaySeconds=5) }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright 2024 New Vector Ltd
Copyright 2024-2025 New Vector Ltd

SPDX-License-Identifier: AGPL-3.0-only
#}
Expand Down Expand Up @@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only
## If omitted the global Synapse resources are used
# resources: {}

{{- sub_schema_values.probe("liveness", failureThreshold=3, periodSeconds=6, timeoutSeconds=2) | indent(2) }}
{{- sub_schema_values.probe("readiness", failureThreshold=3, periodSeconds=2, successThreshold=2, timeoutSeconds=2) | indent(2) }}
{{- sub_schema_values.probe("liveness", periodSeconds=6, timeoutSeconds=2) | indent(2) }}
{{- sub_schema_values.probe("readiness", periodSeconds=2, successThreshold=2, timeoutSeconds=2) | indent(2) }}
{{- sub_schema_values.probe("startup", failureThreshold=21, periodSeconds=2) | indent(2) }}
{%- endmacro %}
Loading
Loading