Files
devops-infra-helm-charts-gcp/helm-templates/kyverno-3.8.1/templates/tests/_helpers.tpl
T
2026-08-26 03:39:42 +05:30

32 lines
936 B
Smarty

{{/* vim: set filetype=mustache: */}}
{{- define "kyverno.test.labels" -}}
{{- template "kyverno.labels.merge" (list
(include "kyverno.labels.common" .)
(include "kyverno.test.matchLabels" .)
) -}}
{{- end -}}
{{- define "kyverno.test.matchLabels" -}}
{{- template "kyverno.labels.merge" (list
(include "kyverno.matchLabels.common" .)
(include "kyverno.labels.component" "test")
) -}}
{{- end -}}
{{- define "kyverno.test.annotations" -}}
{{- $annotations := dict "helm.sh/hook" "test" -}}
{{- with .Values.test.podAnnotations -}}
{{- $annotations = merge $annotations . -}}
{{- end -}}
{{- toYaml $annotations -}}
{{- end -}}
{{- define "kyverno.test.image" -}}
{{- template "kyverno.image" (dict "image" .Values.test.image "defaultTag" "latest") -}}
{{- end -}}
{{- define "kyverno.test.imagePullPolicy" -}}
{{- default .Values.admissionController.container.image.pullPolicy .Values.test.image.pullPolicy -}}
{{- end -}}