fix markers helper does not need step context

This commit is contained in:
Gaël Goinvic committed 2025-05-28 15:16:45 +02:00
1 parent 9f8d8a8636
commit 6d013473a4
4 files changed
+4 -4

No files matched your search

@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ range $step := list "pre" "post" -}}
{{- with $.Values.deploymentMarkers -}}
{{- if and .enabled (include "element-io.deployment-markers.markers" (dict "root" $ "context" (dict "step" $step))) }}
{{- if and .enabled (include "element-io.deployment-markers.markers" (dict "root" $)) }}
apiVersion: batch/v1
kind: Job
metadata:
@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
*/ -}}
{{ range $step := list "pre" "post" -}}
{{- with $.Values.deploymentMarkers -}}
{{- if and .enabled .rbac.create (include "element-io.deployment-markers.markers" (dict "root" $ "context" (dict "step" $step))) }}
{{- if and .enabled .rbac.create (include "element-io.deployment-markers.markers" (dict "root" $)) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ range $step := list "pre" "post" -}}
{{- with $.Values.deploymentMarkers -}}
{{- if and .enabled .rbac.create (include "element-io.deployment-markers.markers" (dict "root" $ "context" (dict "step" $step))) }}
{{- if and .enabled .rbac.create (include "element-io.deployment-markers.markers" (dict "root" $)) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ range $step := list "pre" "post" -}}
{{- with $.Values.deploymentMarkers -}}
{{- if .enabled -}}
{{- if and .enabled (include "element-io.deployment-markers.markers" (dict "root" $ "context" (dict "step" $step))) -}}
{{- if and .enabled (include "element-io.deployment-markers.markers" (dict "root" $)) -}}
{{- include "element-io.ess-library.serviceAccount" (dict "root" $ "context" (dict "componentValues" . "nameSuffix" (printf "deployment-markers-%s" $step) "extraAnnotations" (dict "helm.sh/hook" (printf "%s-install,%s-upgrade" $step $step) "helm.sh/hook-weight" "-20"))) }}
{{- end }}
---