k8s/helm-charts/dashy/charts/common/templates/lib/webhook/_rules.tpl
root 1eaf295724
Some checks failed
continuous-integration/drone/push Build is failing
new way of doin
2023-11-16 19:42:02 +10:00

27 lines
660 B
Smarty

{{- define "tc.v1.common.lib.webhook.rules" -}}
{{- $rules := .rules -}}
{{- $rootCtx := .rootCtx }}
rules:
{{- range $rule := $rules }}
- apiVersions:
{{- range $rule.apiVersions }}
- {{ tpl . $rootCtx | quote }}
{{- end }}
apiGroups:
{{- range $rule.apiGroups }}
- {{ tpl . $rootCtx | quote }}
{{- end }}
operations:
{{- range $rule.operations }}
- {{ tpl . $rootCtx | quote }}
{{- end }}
resources:
{{- range $rule.resources }}
- {{ tpl . $rootCtx | quote }}
{{- end -}}
{{- with $rule.scope }}
scope: {{ tpl . $rootCtx | quote }}
{{- end -}}
{{- end -}}
{{- end -}}