softplayer-helm-lib/charts/workload/templates/_workloads.yaml

14 lines
343 B
YAML

{{- define "helpers.allowed_workloads" -}}
{{ index .Chart.Annotations "allowed_workload_kinds" }}
{{- end -}}
{{- define "lib.workload" -}}
---
{{ if eq .Values.workload.kind "Deployment" -}}
{{- if contains .Values.workload.kind (include "helpers.allowed_workloads" .) }}
{{- include "lib.deployment" . }}
{{- end }}
{{- end }}
{{- end }}