From 2a0849650bc80b56b823398b013eb45df688cdc0 Mon Sep 17 00:00:00 2001 From: Gilles Dubuc <4118897+dubuc@users.noreply.github.com> Date: Fri, 19 Apr 2019 02:29:54 -0400 Subject: [PATCH] [stable/elasticsearch] Adding static nodeport support to elasticsearch client service (#12828) * Adding static nodeport support to elasticsearch client service Signed-off-by: Gilles Dubuc * Better nodeport description for elasticsearch Signed-off-by: Gilles Dubuc Co-Authored-By: dubuc <4118897+dubuc@users.noreply.github.com> * Added http prefix to es client service nodeport Signed-off-by: Gilles Dubuc --- stable/elasticsearch/Chart.yaml | 2 +- stable/elasticsearch/README.md | 1 + stable/elasticsearch/templates/client-svc.yaml | 3 +++ stable/elasticsearch/values.yaml | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/stable/elasticsearch/Chart.yaml b/stable/elasticsearch/Chart.yaml index d360df2e3b..df19a59934 100755 --- a/stable/elasticsearch/Chart.yaml +++ b/stable/elasticsearch/Chart.yaml @@ -1,6 +1,6 @@ name: elasticsearch home: https://www.elastic.co/products/elasticsearch -version: 1.24.0 +version: 1.25.0 appVersion: 6.7.0 description: Flexible and powerful open source, distributed real-time search and analytics engine. diff --git a/stable/elasticsearch/README.md b/stable/elasticsearch/README.md index f9f34cdfcd..9fa724018a 100644 --- a/stable/elasticsearch/README.md +++ b/stable/elasticsearch/README.md @@ -86,6 +86,7 @@ The following table lists the configurable parameters of the elasticsearch chart | `client.tolerations` | Client tolerations | `[]` | | `client.serviceAnnotations` | Client Service annotations | `{}` | | `client.serviceType` | Client service type | `ClusterIP` | +| `client.httpNodePort` | Client service HTTP NodePort port number. Has no effect if client.serviceType is not `NodePort`. | `nil` | | `client.loadBalancerIP` | Client loadBalancerIP | `{}` | | `client.loadBalancerSourceRanges` | Client loadBalancerSourceRanges | `{}` | | `client.antiAffinity` | Client anti-affinity policy | `soft` | diff --git a/stable/elasticsearch/templates/client-svc.yaml b/stable/elasticsearch/templates/client-svc.yaml index cbecce5aed..e6325876f9 100644 --- a/stable/elasticsearch/templates/client-svc.yaml +++ b/stable/elasticsearch/templates/client-svc.yaml @@ -17,6 +17,9 @@ spec: ports: - name: http port: 9200 +{{- if and .Values.client.httpNodePort (eq .Values.client.serviceType "NodePort") }} + nodePort: {{ .Values.client.httpNodePort }} +{{- end }} targetPort: http selector: app: {{ template "elasticsearch.name" . }} diff --git a/stable/elasticsearch/values.yaml b/stable/elasticsearch/values.yaml index bbc03dd22a..b8a7b9cd04 100644 --- a/stable/elasticsearch/values.yaml +++ b/stable/elasticsearch/values.yaml @@ -75,6 +75,8 @@ client: name: client replicas: 2 serviceType: ClusterIP + ## If coupled with serviceType = "NodePort", this will set a specific nodePort to the client HTTP port + # httpNodePort: 30920 loadBalancerIP: {} loadBalancerSourceRanges: {} ## (dict) If specified, apply these annotations to the client service