From e5db3245cb7f1a4855c02745258cf9bc7760264d Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Wed, 13 Nov 2019 22:23:20 +0530 Subject: [PATCH] [stable/ghost] bump major version (#18849) 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/pulls/17297 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. Signed-off-by: Sameer Naik --- stable/ghost/Chart.yaml | 2 +- stable/ghost/README.md | 8 ++++++++ stable/ghost/requirements.lock | 6 +++--- stable/ghost/requirements.yaml | 2 +- stable/ghost/templates/_helpers.tpl | 11 +++++++++++ stable/ghost/templates/deployment.yaml | 2 +- 6 files changed, 25 insertions(+), 6 deletions(-) diff --git a/stable/ghost/Chart.yaml b/stable/ghost/Chart.yaml index c0543669be..a170264f7d 100644 --- a/stable/ghost/Chart.yaml +++ b/stable/ghost/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: ghost -version: 8.0.6 +version: 9.0.0 appVersion: 3.0.2 description: A simple, powerful publishing platform that allows you to share your stories with the world keywords: diff --git a/stable/ghost/README.md b/stable/ghost/README.md index e4db7ed4ba..e6dc803e1a 100644 --- a/stable/ghost/README.md +++ b/stable/ghost/README.md @@ -181,6 +181,14 @@ See the [Parameters](#parameters) section to configure the PVC or to disable per ## Upgrading +### To 9.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/pulls/17297 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 5.0.0 Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. diff --git a/stable/ghost/requirements.lock b/stable/ghost/requirements.lock index 25d5517c0b..d4bc5aea67 100644 --- a/stable/ghost/requirements.lock +++ b/stable/ghost/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: mariadb repository: https://kubernetes-charts.storage.googleapis.com/ - version: 6.13.0 -digest: sha256:234702bf5dbec8956e4f113b783db5559f7d3cbf60abf8a89c7a3c73b3c79c5c -generated: 2019-11-04T07:45:36.20980667Z + version: 7.0.1 +digest: sha256:27bef733eb099a7377055cfe2c48e013bd4d55650ff18b50138c80488c812b0b +generated: "2019-11-13T22:05:56.823585977+05:30" diff --git a/stable/ghost/requirements.yaml b/stable/ghost/requirements.yaml index 7c4e77e8a4..93e76cc0bd 100644 --- a/stable/ghost/requirements.yaml +++ b/stable/ghost/requirements.yaml @@ -1,6 +1,6 @@ dependencies: - name: mariadb - version: 6.x.x + version: 7.x.x repository: https://kubernetes-charts.storage.googleapis.com/ condition: mariadb.enabled tags: diff --git a/stable/ghost/templates/_helpers.tpl b/stable/ghost/templates/_helpers.tpl index f8aef07b72..44efd82604 100644 --- a/stable/ghost/templates/_helpers.tpl +++ b/stable/ghost/templates/_helpers.tpl @@ -179,3 +179,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 "ghost.deployment.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "extensions/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} diff --git a/stable/ghost/templates/deployment.yaml b/stable/ghost/templates/deployment.yaml index b2e8b8f702..75e3912271 100644 --- a/stable/ghost/templates/deployment.yaml +++ b/stable/ghost/templates/deployment.yaml @@ -1,5 +1,5 @@ {{- if include "ghost.host" . -}} -apiVersion: apps/v1 +apiVersion: {{ template "ghost.deployment.apiVersion" . }} kind: Deployment metadata: name: {{ template "ghost.fullname" . }}