From 6fc4a044fd43d0e01e698dcbbbeb3bc844216b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Goinvic?= Date: Thu, 5 Jun 2025 10:44:55 +0200 Subject: [PATCH] update comment about hook weights in syn2mas --- .../matrix-authentication-service/syn2mas_job.yaml | 11 ++++++++--- .../matrix-authentication-service/syn2mas_role.yaml | 6 +++--- .../syn2mas_rolebinding.yaml | 6 +++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/charts/matrix-stack/templates/matrix-authentication-service/syn2mas_job.yaml b/charts/matrix-stack/templates/matrix-authentication-service/syn2mas_job.yaml index a21dffbf..bff437a8 100644 --- a/charts/matrix-stack/templates/matrix-authentication-service/syn2mas_job.yaml +++ b/charts/matrix-stack/templates/matrix-authentication-service/syn2mas_job.yaml @@ -36,15 +36,20 @@ metadata: ) }} annotations: {{- if .dryRun }} +{{- /* +Hook Weights are +- -25 : The syn2mas dryRun job, running after MAS pod which initialized its DB +- 0 : The deployment marker job, we want it not to update any marker if the dryRun is not completed +*/}} "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-weight": "-25" {{- else }} "helm.sh/hook": pre-install,pre-upgrade {{- /* Hook Weights are -- -10 : The initSecret hook generating secrets used by the check config job -- -5 : The synapse secret & configMap for the hook, so that they are created before the job -- 0 : The job itself, so that it is run after the secrets and configs are created & +- -10 : The initSecret hook generating secrets used by the syn2mas job +- -5 : The MAS & synapse secret & configMap for the hook, so that they are created before the job +- 0 : The job itself, so that it is run after the secrets and configs are created */}} "helm.sh/hook-weight": "0" {{- end }} diff --git a/charts/matrix-stack/templates/matrix-authentication-service/syn2mas_role.yaml b/charts/matrix-stack/templates/matrix-authentication-service/syn2mas_role.yaml index ebd6cc00..ecd07157 100644 --- a/charts/matrix-stack/templates/matrix-authentication-service/syn2mas_role.yaml +++ b/charts/matrix-stack/templates/matrix-authentication-service/syn2mas_role.yaml @@ -17,9 +17,9 @@ metadata: "helm.sh/hook": pre-install,pre-upgrade {{- /* Hook Weights are -- -10 : The initSecret hook generating secrets used by the check config job -- -5 : The synapse secret & configMap for the hook, so that they are created before the job -- 0 : The job itself, so that it is run after the secrets and configs are created & +- -10 : The initSecret hook generating secrets used by the syn2mas job +- -5 : The MAS & synapse secret & configMap for the hook, so that they are created before the job +- 0 : The job itself, so that it is run after the secrets and configs are created */}} "helm.sh/hook-weight": "0" rules: diff --git a/charts/matrix-stack/templates/matrix-authentication-service/syn2mas_rolebinding.yaml b/charts/matrix-stack/templates/matrix-authentication-service/syn2mas_rolebinding.yaml index 45275b57..b253dadb 100644 --- a/charts/matrix-stack/templates/matrix-authentication-service/syn2mas_rolebinding.yaml +++ b/charts/matrix-stack/templates/matrix-authentication-service/syn2mas_rolebinding.yaml @@ -18,9 +18,9 @@ metadata: "helm.sh/hook": pre-install,pre-upgrade {{- /* Hook Weights are -- -10 : The initSecret hook generating secrets used by the check config job -- -5 : The synapse secret & configMap for the hook, so that they are created before the job -- 0 : The job itself, so that it is run after the secrets and configs are created & +- -10 : The initSecret hook generating secrets used by the syn2mas job +- -5 : The MAS & synapse secret & configMap for the hook, so that they are created before the job +- 0 : The job itself, so that it is run after the secrets and configs are created */}} "helm.sh/hook-weight": "0" roleRef: