From 6eed4deadc8718014412282d86cd5336f65a0082 Mon Sep 17 00:00:00 2001 From: The Bags Date: Tue, 26 Mar 2019 12:41:56 +0100 Subject: [PATCH 1/2] Added ingress to elsticsearch --- elasticsearch/templates/ingress.yaml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 elasticsearch/templates/ingress.yaml diff --git a/elasticsearch/templates/ingress.yaml b/elasticsearch/templates/ingress.yaml new file mode 100644 index 0000000..233be30 --- /dev/null +++ b/elasticsearch/templates/ingress.yaml @@ -0,0 +1,39 @@ +{{- if .Values.ingress.enabled -}} +{{- $servicePort := .Values.httpPort -}} +{{- $serviceName := include "elasticsearch.name" . -}} +{{- $serviceName2 := .Values.name -}} +{{- $ingressPath := .Values.ingress.path -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ .Release.Name }}-ingress + labels: + app: {{ .Chart.Name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: "{{ $serviceName }}-{{ $serviceName2 }}" + servicePort: {{ $servicePort }} + {{- end }} +{{- end }} From 9141bac8c6c166b3fd9695205d74cdb46686b0dc Mon Sep 17 00:00:00 2001 From: The Bags Date: Tue, 26 Mar 2019 14:33:17 +0100 Subject: [PATCH 2/2] added efk values.yaml elasticsearch ingress example --- efk/values.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/efk/values.yaml b/efk/values.yaml index 2febef4..e52b464 100644 --- a/efk/values.yaml +++ b/efk/values.yaml @@ -40,6 +40,17 @@ elasticsearch: classProvisioner: volume.alpha.kubernetes.io/storage-class # Retain or Delete reclaimPolicy: Delete + + ingress: + # if enabled it will create the ingress + enabled: false + hosts: + - your_elsaticsearch_domain.com + annotations: + kubernetes.io/ingress.class: your_controller + path: / + httpPort: 9200 + resources: requests: memory: 1024Mi