From c780e7e3bb3be0fd19b8e137fb2abfe0646a6401 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Mon, 11 Nov 2019 21:13:42 +0530 Subject: [PATCH] [stable/dokuwiki] bump major version (#18691) Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. In https://github.com/helm/charts/pull/17294 the `apiVersion` of the deployment resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. This major version bump signifies this change. Signed-off-by: Sameer Naik --- stable/dokuwiki/Chart.yaml | 2 +- stable/dokuwiki/README.md | 8 ++++++++ stable/dokuwiki/templates/_helpers.tpl | 11 +++++++++++ stable/dokuwiki/templates/deployment.yaml | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/stable/dokuwiki/Chart.yaml b/stable/dokuwiki/Chart.yaml index 7b790f560e..f16c451995 100644 --- a/stable/dokuwiki/Chart.yaml +++ b/stable/dokuwiki/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: dokuwiki -version: 5.2.12 +version: 6.0.0 appVersion: 0.20180422.201901061035 description: DokuWiki is a standards-compliant, simple to use wiki optimized for creating documentation. It is targeted at developer teams, workgroups, and small companies. diff --git a/stable/dokuwiki/README.md b/stable/dokuwiki/README.md index 61b19c1402..a8ab7e74f9 100644 --- a/stable/dokuwiki/README.md +++ b/stable/dokuwiki/README.md @@ -149,6 +149,14 @@ See the [Parameters](#parameters) section to configure the PVC or to disable per ## Upgrading +### To 6.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17294 the `apiVersion` of the deployment resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version signifies this change. + ### To 3.0.0 Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. diff --git a/stable/dokuwiki/templates/_helpers.tpl b/stable/dokuwiki/templates/_helpers.tpl index 06b12a4b0a..f2e0780a8a 100644 --- a/stable/dokuwiki/templates/_helpers.tpl +++ b/stable/dokuwiki/templates/_helpers.tpl @@ -145,3 +145,14 @@ but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else {{- end -}} {{- end -}} {{- end -}} + +{{/* +Return the appropriate apiVersion for deployment. +*/}} +{{- define "dokuwiki.deployment.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "extensions/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} diff --git a/stable/dokuwiki/templates/deployment.yaml b/stable/dokuwiki/templates/deployment.yaml index 196b92a058..6c9affd80b 100644 --- a/stable/dokuwiki/templates/deployment.yaml +++ b/stable/dokuwiki/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1 +apiVersion: {{ template "dokuwiki.deployment.apiVersion" . }} kind: Deployment metadata: name: {{ template "dokuwiki.fullname" . }}