From 4527ebe8a36180ddd16973acddf476abe7264cfe Mon Sep 17 00:00:00 2001 From: Chris Kent Date: Fri, 14 Jun 2019 14:30:23 -0400 Subject: [PATCH] [stable/logstash] Add loadBalancerSourceRanges (#12475) Signed-off-by: Chris Kent --- stable/logstash/Chart.yaml | 2 +- stable/logstash/README.md | 1 + stable/logstash/templates/service.yaml | 8 ++++++++ stable/logstash/values.yaml | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/stable/logstash/Chart.yaml b/stable/logstash/Chart.yaml index b9b89ed8dc..5e87ccd5c4 100644 --- a/stable/logstash/Chart.yaml +++ b/stable/logstash/Chart.yaml @@ -3,7 +3,7 @@ description: Logstash is an open source, server-side data processing pipeline icon: https://www.elastic.co/assets/blt86e4472872eed314/logo-elastic-logstash-lt.svg home: https://www.elastic.co/products/logstash name: logstash -version: 1.12.0 +version: 1.13.0 appVersion: 6.7.0 sources: - https://www.docker.elastic.co diff --git a/stable/logstash/README.md b/stable/logstash/README.md index ef0677b20d..5ae3670f7f 100644 --- a/stable/logstash/README.md +++ b/stable/logstash/README.md @@ -81,6 +81,7 @@ The following table lists the configurable parameters of the chart and its defau | `service.annotations` | Service annotations | `{}` | | `service.ports` | Ports exposed by service | beats | | `service.loadBalancerIP` | The load balancer IP for the service | unset | +| `service.loadBalancerSourceRanges` | CIDR ranges to allow access to load balancer | unset | | `service.clusterIP` | The cluster IP for the service | unset | | `service.nodePort` | The nodePort for the service | unset | | `service.externalTrafficPolicy` | Set externalTrafficPolicy | unset | diff --git a/stable/logstash/templates/service.yaml b/stable/logstash/templates/service.yaml index 4c9eeac07b..4ff9987533 100644 --- a/stable/logstash/templates/service.yaml +++ b/stable/logstash/templates/service.yaml @@ -24,9 +24,17 @@ spec: selector: app: {{ template "logstash.name" . }} release: {{ .Release.Name }} +{{- if eq .Values.service.type "LoadBalancer" }} {{- if .Values.service.loadBalancerIP }} loadBalancerIP: {{ .Values.service.loadBalancerIP }} {{- end }} +{{- if .Values.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{- range $cidr := .Values.service.loadBalancerSourceRanges }} + - {{ $cidr }} +{{- end }} +{{- end }} +{{- end }} {{- if .Values.service.clusterIP }} clusterIP: {{ .Values.service.clusterIP }} {{- end }} diff --git a/stable/logstash/values.yaml b/stable/logstash/values.yaml index 6ec1a62c49..d973af4047 100644 --- a/stable/logstash/values.yaml +++ b/stable/logstash/values.yaml @@ -45,6 +45,8 @@ service: # targetPort: http # protocol: TCP # loadBalancerIP: 10.0.0.1 + # loadBalancerSourceRanges: + # - 192.168.0.1 ports: # - name: syslog-udp # containerPort: 1514