502b653768
Logstash should not be using a custom port for collectd input from the K8s NodePort range since it might cause a conflict if the port is allocated to another service. Therefore, logstash will use a proper NodePort value reserved by the nginx-ingress service. Remove hostNetworking from Logstash since it is no longer required. Add support for specifying a helm nodePort value for TCP/UDP services exposed for the nginx-ingress controller. Story: 2007221 Task: 39544 Change-Id: Ifdb750a578ad6a5e7b96019e7caf6fe1231fa1be Signed-off-by: Matt Peters <matt.peters@windriver.com>
59 lines
2.0 KiB
Diff
59 lines
2.0 KiB
Diff
From 872dd678b0ea08be23700337665ea2125dab4d0d Mon Sep 17 00:00:00 2001
|
|
From: Matt Peters <matt.peters@windriver.com>
|
|
Date: Thu, 23 Apr 2020 18:39:16 -0500
|
|
Subject: [PATCH] [stable/nginx-ingress] allow nodePort for tcp/udp services
|
|
|
|
---
|
|
stable/nginx-ingress/templates/controller-service.yaml | 10 ++++++++++
|
|
stable/nginx-ingress/values.yaml | 4 ++++
|
|
2 files changed, 14 insertions(+)
|
|
|
|
diff --git a/stable/nginx-ingress/templates/controller-service.yaml b/stable/nginx-ingress/templates/controller-service.yaml
|
|
index a81c81e..6389c14 100644
|
|
--- a/stable/nginx-ingress/templates/controller-service.yaml
|
|
+++ b/stable/nginx-ingress/templates/controller-service.yaml
|
|
@@ -60,12 +60,22 @@ spec:
|
|
port: {{ $key }}
|
|
protocol: TCP
|
|
targetPort: "{{ $key }}-tcp"
|
|
+ {{- if $.Values.controller.service.nodePorts.tcp }}
|
|
+ {{- if index $.Values.controller.service.nodePorts.tcp $key }}
|
|
+ nodePort: {{ index $.Values.controller.service.nodePorts.tcp $key }}
|
|
+ {{- end }}
|
|
+ {{- end }}
|
|
{{- end }}
|
|
{{- range $key, $value := .Values.udp }}
|
|
- name: "{{ $key }}-udp"
|
|
port: {{ $key }}
|
|
protocol: UDP
|
|
targetPort: "{{ $key }}-udp"
|
|
+ {{- if $.Values.controller.service.nodePorts.udp }}
|
|
+ {{- if index $.Values.controller.service.nodePorts.udp $key }}
|
|
+ nodePort: {{ index $.Values.controller.service.nodePorts.udp $key }}
|
|
+ {{- end }}
|
|
+ {{- end }}
|
|
{{- end }}
|
|
selector:
|
|
app: {{ template "nginx-ingress.name" . }}
|
|
diff --git a/stable/nginx-ingress/values.yaml b/stable/nginx-ingress/values.yaml
|
|
index 80bc1a6..71bbcb3 100644
|
|
--- a/stable/nginx-ingress/values.yaml
|
|
+++ b/stable/nginx-ingress/values.yaml
|
|
@@ -192,9 +192,13 @@ controller:
|
|
# nodePorts:
|
|
# http: 32080
|
|
# https: 32443
|
|
+ # tcp:
|
|
+ # 8080: 32808
|
|
nodePorts:
|
|
http: ""
|
|
https: ""
|
|
+ tcp: {}
|
|
+ udp: {}
|
|
|
|
extraContainers: []
|
|
## Additional containers to be added to the controller pod.
|
|
--
|
|
2.24.0
|
|
|