mirror of
https://github.com/truenas/charts.git
synced 2024-04-21 15:21:45 +00:00
add capabilities
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{{/*
|
||||
Return the appropriate apiVersion for controllers
|
||||
*/}}
|
||||
{{- define "ix.v1.common.capabilities.controller.apiVersion" -}}
|
||||
{{- if eq .Values.controller.type "deployment" -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- else if eq .Values.controller.type "daemonset" -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- else if eq .Values.controller.type "statefulset" -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- else -}}
|
||||
{{- fail (printf "Not a valid controller.type (%s)" .Values.controller.type) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for CronJob
|
||||
*/}}
|
||||
{{- define "ix.v1.common.capabilities.cronJob.apiVersion" -}}
|
||||
{{- print "batch/v1" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for Job
|
||||
*/}}
|
||||
{{- define "ix.v1.common.capabilities.job.apiVersion" -}}
|
||||
{{- print "batch/v1" -}}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user