From 94910e836d2cfc3a91ee3a1cb488f0da4588fd26 Mon Sep 17 00:00:00 2001 From: David Berkman Date: Thu, 25 Jun 2020 11:07:38 -0700 Subject: [PATCH] [bitnami/elasticsearch] allow existing claims in master and data (#2881) * allow existing claims in master and data * version bump requested by linter * wrong version * silly me, does need a bump * version changes * requested fixes * documentation --- bitnami/elasticsearch/Chart.yaml | 2 +- bitnami/elasticsearch/README.md | 2 ++ bitnami/elasticsearch/templates/data-statefulset.yaml | 4 ++++ .../elasticsearch/templates/master-statefulset.yaml | 4 ++++ bitnami/elasticsearch/values-production.yaml | 10 ++++++++++ bitnami/elasticsearch/values.yaml | 10 ++++++++++ 6 files changed, 31 insertions(+), 1 deletion(-) diff --git a/bitnami/elasticsearch/Chart.yaml b/bitnami/elasticsearch/Chart.yaml index 675ccf6634..f8ea6279aa 100644 --- a/bitnami/elasticsearch/Chart.yaml +++ b/bitnami/elasticsearch/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: elasticsearch -version: 12.3.6 +version: 12.4.0 appVersion: 7.8.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 5acc085154..478afe722d 100644 --- a/bitnami/elasticsearch/README.md +++ b/bitnami/elasticsearch/README.md @@ -91,6 +91,7 @@ The following table lists the configurable parameters of the Elasticsearch chart | `master.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | | `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | | `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.existingClaim` | Existing Persistent Volume Claim | `nil` | | `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | | `master.persistence.size` | Persistent Volume Size | `8Gi` | | `master.securityContext.enabled` | Enable security context for master-eligible pods | `true` | @@ -146,6 +147,7 @@ The following table lists the configurable parameters of the Elasticsearch chart | `data.resources` | CPU/Memory resource requests/limits for data nodes | `requests: { cpu: "25m", memory: "2048Mi" }` | | `data.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | | `data.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `data.persistence.existingClaim` | Existing Persistent Volume Claim | `nil` | | `data.persistence.storageClass` | Persistent Volume Storage Class | `` | | `data.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | | `data.persistence.size` | Persistent Volume Size | `8Gi` | diff --git a/bitnami/elasticsearch/templates/data-statefulset.yaml b/bitnami/elasticsearch/templates/data-statefulset.yaml index 26c7ba3538..1e325823f8 100644 --- a/bitnami/elasticsearch/templates/data-statefulset.yaml +++ b/bitnami/elasticsearch/templates/data-statefulset.yaml @@ -216,6 +216,10 @@ spec: {{- if not .Values.data.persistence.enabled }} - name: "data" emptyDir: {} +{{- else if .Values.data.persistence.existingClaim }} + - name: "data" + persistentVolumeClaim: + claimName: {{ .Values.data.persistence.existingClaim }} {{- else }} volumeClaimTemplates: - metadata: diff --git a/bitnami/elasticsearch/templates/master-statefulset.yaml b/bitnami/elasticsearch/templates/master-statefulset.yaml index 2335fa4a7b..d72c248664 100644 --- a/bitnami/elasticsearch/templates/master-statefulset.yaml +++ b/bitnami/elasticsearch/templates/master-statefulset.yaml @@ -219,6 +219,10 @@ spec: {{- if not .Values.master.persistence.enabled }} - name: "data" emptyDir: {} +{{- else if .Values.master.persistence.existingClaim }} + - name: "data" + persistentVolumeClaim: + claimName: {{ .Values.master.persistence.existingClaim }} {{- else }} volumeClaimTemplates: - metadata: diff --git a/bitnami/elasticsearch/values-production.yaml b/bitnami/elasticsearch/values-production.yaml index 12060a0107..e4bb029458 100644 --- a/bitnami/elasticsearch/values-production.yaml +++ b/bitnami/elasticsearch/values-production.yaml @@ -251,6 +251,11 @@ master: ## GKE, AWS & OpenStack) ## # storageClass: "-" + ## If persistence is enable, and this value is defined, + ## then accept the value as an existing Persistent Volume Claim to which + ## the container should be bound + ## + # existingClaim: my-persistent-volume-claim ## Persistent Volume Claim annotations ## annotations: {} @@ -481,6 +486,11 @@ data: ## GKE, AWS & OpenStack) ## # storageClass: "-" + ## If persistence is enable, and this value is defined, + ## then accept the value as an existing Persistent Volume Claim to which + ## the container should be bound + ## + # existingClaim: my-persistent-volume-claim ## Persistent Volume Claim annotations ## annotations: {} diff --git a/bitnami/elasticsearch/values.yaml b/bitnami/elasticsearch/values.yaml index 4760e0b94c..3af1154499 100644 --- a/bitnami/elasticsearch/values.yaml +++ b/bitnami/elasticsearch/values.yaml @@ -251,6 +251,11 @@ master: ## GKE, AWS & OpenStack) ## # storageClass: "-" + ## If persistence is enable, and this value is defined, + ## then accept the value as an existing Persistent Volume Claim to which + ## the container should be bound + ## + # existingClaim: my-persistent-volume-claim ## Persistent Volume Claim annotations ## annotations: {} @@ -481,6 +486,11 @@ data: ## GKE, AWS & OpenStack) ## # storageClass: "-" + ## If persistence is enable, and this value is defined, + ## then accept the value as an existing Persistent Volume Claim to which + ## the container should be bound + ## + # existingClaim: my-persistent-volume-claim ## Persistent Volume Claim annotations ## annotations: {}