From c27bab41fe4db189fb2cd44fd8605c445a908411 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Tue, 12 Nov 2019 14:24:06 +0530 Subject: [PATCH] [stable/phpbb] bump major version (#18702) 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/17307 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/phpbb/Chart.yaml | 2 +- stable/phpbb/README.md | 8 ++++++++ stable/phpbb/requirements.lock | 6 +++--- stable/phpbb/requirements.yaml | 2 +- stable/phpbb/templates/_helpers.tpl | 11 +++++++++++ stable/phpbb/templates/deployment.yaml | 2 +- 6 files changed, 25 insertions(+), 6 deletions(-) diff --git a/stable/phpbb/Chart.yaml b/stable/phpbb/Chart.yaml index fb7a7f3477..753d66f9c9 100644 --- a/stable/phpbb/Chart.yaml +++ b/stable/phpbb/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: phpbb -version: 6.2.6 +version: 7.0.0 appVersion: 3.2.8 description: Community forum that supports the notion of users and groups, file attachments, full-text search, notifications and more. keywords: diff --git a/stable/phpbb/README.md b/stable/phpbb/README.md index 7cd1c32e62..a8f163fd21 100644 --- a/stable/phpbb/README.md +++ b/stable/phpbb/README.md @@ -148,6 +148,14 @@ See the [Parameters](#parameters) section to configure the PVC or to disable per ## Upgrading +### 7.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/17307 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/phpbb/requirements.lock b/stable/phpbb/requirements.lock index 992b3fc79d..d4ab498706 100644 --- a/stable/phpbb/requirements.lock +++ b/stable/phpbb/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: mariadb repository: https://kubernetes-charts.storage.googleapis.com/ - version: 6.12.2 -digest: sha256:a363428d6463718a9523a88c70e485218373e315f2979cb1bb17b034ec2be96a -generated: 2019-10-24T17:29:58.399956213Z + version: 7.0.0 +digest: sha256:cd64413a4a697ccf85c0091e9c55cdc5876938ddced84c05d37c57ff9abc5864 +generated: "2019-11-09T11:23:46.242748477+05:30" diff --git a/stable/phpbb/requirements.yaml b/stable/phpbb/requirements.yaml index 127c019356..389c9f3cba 100644 --- a/stable/phpbb/requirements.yaml +++ b/stable/phpbb/requirements.yaml @@ -1,5 +1,5 @@ dependencies: - name: mariadb - version: 6.x.x + version: 7.x.x repository: https://kubernetes-charts.storage.googleapis.com/ condition: mariadb.enabled diff --git a/stable/phpbb/templates/_helpers.tpl b/stable/phpbb/templates/_helpers.tpl index ffbba2c345..713fe4e432 100644 --- a/stable/phpbb/templates/_helpers.tpl +++ b/stable/phpbb/templates/_helpers.tpl @@ -153,3 +153,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 "phpbb.deployment.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "extensions/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} diff --git a/stable/phpbb/templates/deployment.yaml b/stable/phpbb/templates/deployment.yaml index d8db9c4d8c..2aa5754062 100644 --- a/stable/phpbb/templates/deployment.yaml +++ b/stable/phpbb/templates/deployment.yaml @@ -1,5 +1,5 @@ {{- if or .Values.mariadb.enabled .Values.externalDatabase.host -}} -apiVersion: apps/v1 +apiVersion: {{ template "phpbb.deployment.apiVersion" . }} kind: Deployment metadata: name: "{{ template "phpbb.fullname" . }}"