[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 4dfac075aa the `apiVersion` of the deployment resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage.
This commit is contained in:
Sameer Naik
2019-11-19 10:20:19 +05:30
parent 351faa664f
commit 2154c35a97
7 changed files with 34 additions and 5 deletions

View File

@@ -466,6 +466,12 @@ Elasticsearch master nodes store the cluster status at `/bitnami/elasticsearch/d
To resolve such issues, PVC's are now attached for master node data persistence.
---
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 [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.
### 7.0.0
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.

View File

@@ -2,6 +2,29 @@
{{/*
Expand the name of the chart.
*/}}
{{/*
Return the appropriate apiVersion for statefulset.
*/}}
{{- define "statefulset.apiVersion" -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "apps/v1beta1" -}}
{{- else -}}
{{- print "apps/v1" -}}
{{- end -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for deployment.
*/}}
{{- define "deployment.apiVersion" -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "extensions/v1beta1" -}}
{{- else -}}
{{- print "apps/v1" -}}
{{- end -}}
{{- end -}}
{{- define "elasticsearch.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@@ -1,4 +1,4 @@
apiVersion: apps/v1
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ include "elasticsearch.coordinating.fullname" . }}

View File

@@ -1,4 +1,4 @@
apiVersion: apps/v1
apiVersion: {{ template "statefulset.apiVersion" . }}
kind: StatefulSet
metadata:
name: {{ include "elasticsearch.data.fullname" . }}

View File

@@ -1,5 +1,5 @@
{{- if .Values.ingest.enabled }}
apiVersion: apps/v1
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ include "elasticsearch.ingest.fullname" . }}

View File

@@ -1,4 +1,4 @@
apiVersion: apps/v1
apiVersion: {{ template "statefulset.apiVersion" . }}
kind: StatefulSet
metadata:
name: {{ include "elasticsearch.master.fullname" . }}

View File

@@ -1,5 +1,5 @@
{{- if .Values.metrics.enabled }}
apiVersion: apps/v1
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ include "elasticsearch.metrics.fullname" . }}