Skip to content

Commit 2154c35

Browse files
author
Sameer Naik
committed
[bitnami/elasticsearch] bump major version
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 4dfac07 the `apiVersion` of the deployment resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage.
1 parent 351faa6 commit 2154c35

File tree

7 files changed

+34
-5
lines changed

7 files changed

+34
-5
lines changed

bitnami/elasticsearch/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,12 @@ Elasticsearch master nodes store the cluster status at `/bitnami/elasticsearch/d
466466

467467
To resolve such issues, PVC's are now attached for master node data persistence.
468468

469+
---
470+
471+
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.
472+
473+
In [4dfac075aacf74405e31ae5b27df4369e84eb0b0](https://github.com/bitnami/charts/commit/4dfac075aacf74405e31ae5b27df4369e84eb0b0) the `apiVersion` of the deployment resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage.
474+
469475
### 7.0.0
470476

471477
This version enabled by default the initContainer that modify some kernel settings to meet the Elasticsearch requirements. More info in the ["Default kernel settings"](#default-kernel-settings) section.

bitnami/elasticsearch/templates/_helpers.tpl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22
{{/*
33
Expand the name of the chart.
44
*/}}
5+
6+
{{/*
7+
Return the appropriate apiVersion for statefulset.
8+
*/}}
9+
{{- define "statefulset.apiVersion" -}}
10+
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
11+
{{- print "apps/v1beta1" -}}
12+
{{- else -}}
13+
{{- print "apps/v1" -}}
14+
{{- end -}}
15+
{{- end -}}
16+
17+
{{/*
18+
Return the appropriate apiVersion for deployment.
19+
*/}}
20+
{{- define "deployment.apiVersion" -}}
21+
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
22+
{{- print "extensions/v1beta1" -}}
23+
{{- else -}}
24+
{{- print "apps/v1" -}}
25+
{{- end -}}
26+
{{- end -}}
27+
528
{{- define "elasticsearch.name" -}}
629
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
730
{{- end -}}

bitnami/elasticsearch/templates/coordinating-deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: apps/v1
1+
apiVersion: {{ template "deployment.apiVersion" . }}
22
kind: Deployment
33
metadata:
44
name: {{ include "elasticsearch.coordinating.fullname" . }}

bitnami/elasticsearch/templates/data-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: apps/v1
1+
apiVersion: {{ template "statefulset.apiVersion" . }}
22
kind: StatefulSet
33
metadata:
44
name: {{ include "elasticsearch.data.fullname" . }}

bitnami/elasticsearch/templates/ingest-deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- if .Values.ingest.enabled }}
2-
apiVersion: apps/v1
2+
apiVersion: {{ template "deployment.apiVersion" . }}
33
kind: Deployment
44
metadata:
55
name: {{ include "elasticsearch.ingest.fullname" . }}

bitnami/elasticsearch/templates/master-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: apps/v1
1+
apiVersion: {{ template "statefulset.apiVersion" . }}
22
kind: StatefulSet
33
metadata:
44
name: {{ include "elasticsearch.master.fullname" . }}

bitnami/elasticsearch/templates/metrics-deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- if .Values.metrics.enabled }}
2-
apiVersion: apps/v1
2+
apiVersion: {{ template "deployment.apiVersion" . }}
33
kind: Deployment
44
metadata:
55
name: {{ include "elasticsearch.metrics.fullname" . }}

0 commit comments

Comments
 (0)