Skip to content

Commit

Permalink
[stable/drupal] bump major version (helm#18689)
Browse files Browse the repository at this point in the history
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 helm#17295 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 <sameersbn@vmware.com>
  • Loading branch information
Sameer Naik authored and Jose Alban committed Nov 22, 2019
1 parent 40b4b4a commit 3ee25a8
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion stable/drupal/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: drupal
version: 5.2.9
version: 6.0.0
appVersion: 8.7.8
description: One of the most versatile open source content management systems.
keywords:
Expand Down
8 changes: 8 additions & 0 deletions stable/drupal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,14 @@ $ helm install --name my-release --set persistence.drupal.existingClaim=PVC_NAME

## 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/17295 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 2.0.0

Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments.
Expand Down
6 changes: 3 additions & 3 deletions stable/drupal/requirements.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: mariadb
repository: https://kubernetes-charts.storage.googleapis.com/
version: 6.12.2
digest: sha256:a363428d6463718a9523a88c70e485218373e315f2979cb1bb17b034ec2be96a
generated: 2019-10-29T07:26:54.90698574Z
version: 7.0.0
digest: sha256:cd64413a4a697ccf85c0091e9c55cdc5876938ddced84c05d37c57ff9abc5864
generated: "2019-11-09T09:50:12.572245686+05:30"
2 changes: 1 addition & 1 deletion stable/drupal/requirements.yaml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions stable/drupal/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 "drupal.deployment.apiVersion" -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "extensions/v1beta1" -}}
{{- else -}}
{{- print "apps/v1" -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion stable/drupal/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1
apiVersion: {{ template "drupal.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "drupal.fullname" . }}
Expand Down

0 comments on commit 3ee25a8

Please sign in to comment.