From 8894c6a3e9f294cc81679b763d07bff3075e3469 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Hernandez Date: Fri, 13 Dec 2019 10:48:34 +0000 Subject: [PATCH 1/3] [stable/elasticsearch] Fix nameOverride issue --- bitnami/elasticsearch/Chart.yaml | 2 +- bitnami/elasticsearch/README.md | 3 +-- bitnami/elasticsearch/templates/_helpers.tpl | 9 +++++++++ bitnami/elasticsearch/values-production.yaml | 3 --- bitnami/elasticsearch/values.yaml | 3 --- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/bitnami/elasticsearch/Chart.yaml b/bitnami/elasticsearch/Chart.yaml index 800a87a25..09d39b9cf 100644 --- a/bitnami/elasticsearch/Chart.yaml +++ b/bitnami/elasticsearch/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: elasticsearch -version: 10.0.0 +version: 10.0.1 appVersion: 7.5.0 description: A highly scalable open-source full-text search and analytics engine keywords: diff --git a/bitnami/elasticsearch/README.md b/bitnami/elasticsearch/README.md index d4aa4bb35..611df7a23 100644 --- a/bitnami/elasticsearch/README.md +++ b/bitnami/elasticsearch/README.md @@ -250,7 +250,6 @@ The following table lists the configurable parameters of the Elasticsearch chart | `kibana.enabled` | Use bundled Kibana | `false` | | `kibana.elasticsearch.hosts` | Array containing hostnames for the ES instances. Used to generate the URL | `{{ include "elasticsearch.coordinating.fullname" . }}` Coordinating service (fullname) | | `kibana.elasticsearch.port` | Port to connect Kibana and ES instance. Used to generate the URL | `9200` | -| `kibana.nameOverride` | String to partially override elasticsearch.fullname template in the kibana subchart | `elasticsearch` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, @@ -459,7 +458,7 @@ You can disable the initContainer using the `sysctlImage.enabled=false` paramete ### Enable bundled Kibana This Elasticsearch chart contains Kibana as subchart, you can enable it just setting the `kibana.enabled=true` parameter. It is enabled by default using the `values-production.yaml` file. -If you want to modify the `nameOverride` parameter in the Elasticsearch chart, you also need to set the same value for the `kibana.nameOverride` in order to use the same value in both charts. +To see the notes with some operational instructions from the Kibana chart, please use the `--render-subchart-notes` as part of your `helm install` command, in this way you can see the Kibana and ES notes in your terminal. ## Persistence diff --git a/bitnami/elasticsearch/templates/_helpers.tpl b/bitnami/elasticsearch/templates/_helpers.tpl index 6be58dd18..652a28e88 100644 --- a/bitnami/elasticsearch/templates/_helpers.tpl +++ b/bitnami/elasticsearch/templates/_helpers.tpl @@ -126,9 +126,18 @@ Create a default fully qualified coordinating name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} {{- define "elasticsearch.coordinating.fullname" -}} +{{/* If Kibana is enabled. Evaluated in the Kibana subchart */}} +{{- if .Values.enabled -}} +{{- printf "%s-%s" .Release.Name .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}} +{{/* If Kibana is enabled. Evaluated in the ES chart */}} +{{- else if .Values.kibana.enabled -}} +{{- printf "%s-%s" .Release.Name .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}} +{{/* If Kibana is not enabled */}} +{{- else -}} {{- $name := default .Chart.Name .Values.nameOverride -}} {{- printf "%s-%s-%s" .Release.Name $name .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- end -}} {{/* Create a default fully qualified data name. diff --git a/bitnami/elasticsearch/values-production.yaml b/bitnami/elasticsearch/values-production.yaml index a15e106c9..011e88e26 100644 --- a/bitnami/elasticsearch/values-production.yaml +++ b/bitnami/elasticsearch/values-production.yaml @@ -742,6 +742,3 @@ kibana: hosts: - '{{ include "elasticsearch.coordinating.fullname" . }}' port: 9200 - ## String to partially override elasticsearch.fullname template in the kibana subchart - ## - nameOverride: elasticsearch diff --git a/bitnami/elasticsearch/values.yaml b/bitnami/elasticsearch/values.yaml index 6b227c22b..8536f3c79 100644 --- a/bitnami/elasticsearch/values.yaml +++ b/bitnami/elasticsearch/values.yaml @@ -742,6 +742,3 @@ kibana: hosts: - '{{ include "elasticsearch.coordinating.fullname" . }}' port: 9200 - ## String to partially override elasticsearch.fullname template in the kibana subchart - ## - nameOverride: elasticsearch From 83243878c36e70e4c4f59b55d34b5de93b047087 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Hernandez Date: Fri, 13 Dec 2019 12:47:45 +0000 Subject: [PATCH 2/3] Use global value to enable kibana --- bitnami/elasticsearch/README.md | 8 ++++---- bitnami/elasticsearch/requirements.lock | 4 ++-- bitnami/elasticsearch/requirements.yaml | 2 +- bitnami/elasticsearch/templates/_helpers.tpl | 7 +------ bitnami/elasticsearch/values-production.yaml | 4 ++-- bitnami/elasticsearch/values.yaml | 4 ++-- 6 files changed, 12 insertions(+), 17 deletions(-) diff --git a/bitnami/elasticsearch/README.md b/bitnami/elasticsearch/README.md index 611df7a23..732c0062f 100644 --- a/bitnami/elasticsearch/README.md +++ b/bitnami/elasticsearch/README.md @@ -247,7 +247,7 @@ The following table lists the configurable parameters of the Elasticsearch chart ### Kibana Parameters -| `kibana.enabled` | Use bundled Kibana | `false` | +| `global.kibanaEnabled` | Use bundled Kibana | `false` | | `kibana.elasticsearch.hosts` | Array containing hostnames for the ES instances. Used to generate the URL | `{{ include "elasticsearch.coordinating.fullname" . }}` Coordinating service (fullname) | | `kibana.elasticsearch.port` | Port to connect Kibana and ES instance. Used to generate the URL | `9200` | @@ -441,8 +441,8 @@ This chart includes a `values-production.yaml` file where you can find some para - Enable bundled Kibana: ```diff -- kibana.enabled: false -+ kibana.enabled: true +- global.kibanaEnabled: false ++ global.kibanaEnabled: true ``` ### Default kernel settings @@ -457,7 +457,7 @@ You can disable the initContainer using the `sysctlImage.enabled=false` paramete ### Enable bundled Kibana -This Elasticsearch chart contains Kibana as subchart, you can enable it just setting the `kibana.enabled=true` parameter. It is enabled by default using the `values-production.yaml` file. +This Elasticsearch chart contains Kibana as subchart, you can enable it just setting the `global.kibanaEnabled=true` parameter. It is enabled by default using the `values-production.yaml` file. To see the notes with some operational instructions from the Kibana chart, please use the `--render-subchart-notes` as part of your `helm install` command, in this way you can see the Kibana and ES notes in your terminal. ## Persistence diff --git a/bitnami/elasticsearch/requirements.lock b/bitnami/elasticsearch/requirements.lock index 80f18828c..1fd77d155 100644 --- a/bitnami/elasticsearch/requirements.lock +++ b/bitnami/elasticsearch/requirements.lock @@ -2,5 +2,5 @@ dependencies: - name: kibana repository: https://charts.bitnami.com/bitnami version: 5.0.0 -digest: sha256:25180f145e2b144df74901fa1825cedd396faa2d5d1881a45b28d61a9e000bde -generated: "2019-12-12T18:42:40.963383539Z" +digest: sha256:4970b5ac3743b773c6608e77e28eb0928d45c3379bbe6660a35d8d4ef07613df +generated: "2019-12-13T12:46:10.381126027Z" diff --git a/bitnami/elasticsearch/requirements.yaml b/bitnami/elasticsearch/requirements.yaml index 08fffed29..17d1dfff1 100644 --- a/bitnami/elasticsearch/requirements.yaml +++ b/bitnami/elasticsearch/requirements.yaml @@ -2,4 +2,4 @@ dependencies: - name: kibana version: 5.x.x repository: https://charts.bitnami.com/bitnami - condition: kibana.enabled + condition: global.kibanaEnabled diff --git a/bitnami/elasticsearch/templates/_helpers.tpl b/bitnami/elasticsearch/templates/_helpers.tpl index 652a28e88..85d49f96f 100644 --- a/bitnami/elasticsearch/templates/_helpers.tpl +++ b/bitnami/elasticsearch/templates/_helpers.tpl @@ -126,13 +126,8 @@ Create a default fully qualified coordinating name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} {{- define "elasticsearch.coordinating.fullname" -}} -{{/* If Kibana is enabled. Evaluated in the Kibana subchart */}} -{{- if .Values.enabled -}} +{{- if .Values.global.kibanaEnabled -}} {{- printf "%s-%s" .Release.Name .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}} -{{/* If Kibana is enabled. Evaluated in the ES chart */}} -{{- else if .Values.kibana.enabled -}} -{{- printf "%s-%s" .Release.Name .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}} -{{/* If Kibana is not enabled */}} {{- else -}} {{- $name := default .Chart.Name .Values.nameOverride -}} {{- printf "%s-%s-%s" .Release.Name $name .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}} diff --git a/bitnami/elasticsearch/values-production.yaml b/bitnami/elasticsearch/values-production.yaml index 011e88e26..eba4cceb5 100644 --- a/bitnami/elasticsearch/values-production.yaml +++ b/bitnami/elasticsearch/values-production.yaml @@ -11,6 +11,7 @@ global: ## coordinating: name: coordinating-only + kibanaEnabled: true ## Bitnami Elasticsearch image version ## ref: https://hub.docker.com/r/bitnami/elasticsearch/tags/ @@ -734,10 +735,9 @@ metrics: # selector: # prometheus: my-prometheus -## Enable bundled Kibana +## Bundled Kibana parameters ## kibana: - enabled: true elasticsearch: hosts: - '{{ include "elasticsearch.coordinating.fullname" . }}' diff --git a/bitnami/elasticsearch/values.yaml b/bitnami/elasticsearch/values.yaml index 8536f3c79..69e89764d 100644 --- a/bitnami/elasticsearch/values.yaml +++ b/bitnami/elasticsearch/values.yaml @@ -11,6 +11,7 @@ global: ## coordinating: name: coordinating-only + kibanaEnabled: false ## Bitnami Elasticsearch image version ## ref: https://hub.docker.com/r/bitnami/elasticsearch/tags/ @@ -734,10 +735,9 @@ metrics: # selector: # prometheus: my-prometheus -## Enable bundled Kibana +## Bundled Kibana parameters ## kibana: - enabled: false elasticsearch: hosts: - '{{ include "elasticsearch.coordinating.fullname" . }}' From fe8854e3f2b96122a1dfb7205972f5494ae4daf4 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Hernandez Date: Fri, 13 Dec 2019 12:49:53 +0000 Subject: [PATCH 3/3] Bump minor version --- bitnami/elasticsearch/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitnami/elasticsearch/Chart.yaml b/bitnami/elasticsearch/Chart.yaml index 09d39b9cf..89a6c32a3 100644 --- a/bitnami/elasticsearch/Chart.yaml +++ b/bitnami/elasticsearch/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: elasticsearch -version: 10.0.1 +version: 10.1.0 appVersion: 7.5.0 description: A highly scalable open-source full-text search and analytics engine keywords: