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

13 lines
366 B
YAML
Raw Normal View History

2024-05-05 16:51:37 +00:00
{{- define "helpers.allowed_workloads" -}}
{{ index .Chart.Annotations "helm.badhouseplants.net/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 }}