diff --git a/stable/satisfy/Chart.yaml b/stable/satisfy/Chart.yaml index 3afc0a6fc8..d68c132ced 100644 --- a/stable/satisfy/Chart.yaml +++ b/stable/satisfy/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: satisfy -version: 1.0.0 +version: 1.1.0 appVersion: "3.0.4" description: Composer repo hosting with Satisfy home: https://github.com/anapsix/docker-satisfy diff --git a/stable/satisfy/templates/_helpers.tpl b/stable/satisfy/templates/_helpers.tpl index 79f6cd76e4..d8f83b371e 100644 --- a/stable/satisfy/templates/_helpers.tpl +++ b/stable/satisfy/templates/_helpers.tpl @@ -37,4 +37,15 @@ Create chart name and version as used by the chart label. {{- else -}} {{- printf "%s:%s" .Values.image.repository .Values.image.tag -}} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} + +{{/* +Use apps/v1 when supported, fallback to apps/v1beta2 if it's not. +*/}} +{{- define "satisfy.deployAPIVersion" -}} +{{- if .Capabilities.APIVersions.Has "apps/v1" -}} +{{- printf "apps/v1" -}} +{{- else -}} +{{- printf "apps/v1beta2" -}} +{{- end -}} +{{- end -}} diff --git a/stable/satisfy/templates/deployment.yaml b/stable/satisfy/templates/deployment.yaml index 9432c69dd9..b27e92626b 100644 --- a/stable/satisfy/templates/deployment.yaml +++ b/stable/satisfy/templates/deployment.yaml @@ -1,4 +1,5 @@ -apiVersion: apps/v1beta2 +{{- $apiVersion := include "satisfy.deployAPIVersion" . -}} +apiVersion: {{ $apiVersion }} kind: Deployment metadata: name: {{ include "satisfy.fullname" . }}