Skip to content

Commit

Permalink
chore(charts): define APIVersion template
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingdon Barrett committed Nov 2, 2019
1 parent ef6b745 commit f248611
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions charts/workflow-manager/templates/_helpers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ rbac.authorization.k8s.io/v1alpha1
rbac.authorization.k8s.io/v1
{{- end -}}
{{- end -}}
{{- define "APIVersion" -}}
{{- if .Capabilities.APIVersions.Has "apps/v1" -}}
apps/v1
{{- else if .Capabilities.APIVersions.Has "extensions/v1beta1" -}}
extensions/v1beta1
{{- else -}}
apps/v1
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: {{ .Values.global.api_group }}
apiVersion: {{ template "APIVersion" . }}
kind: Deployment
metadata:
name: deis-workflow-manager
Expand Down

0 comments on commit f248611

Please sign in to comment.