You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by to...@apache.org on 2021/05/08 06:44:47 UTC

[apisix-helm-chart] branch master updated: feat: support to enable apisix stream proxy (#68)

This is an automated email from the ASF dual-hosted git repository.

tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-helm-chart.git


The following commit(s) were added to refs/heads/master by this push:
     new c7edd2d  feat: support to enable apisix stream proxy (#68)
c7edd2d is described below

commit c7edd2da0bac6a1c350478226cbee3c20a9556bc
Author: Alex Zhang <zc...@gmail.com>
AuthorDate: Sat May 8 14:43:33 2021 +0800

    feat: support to enable apisix stream proxy (#68)
---
 charts/apisix/templates/configmap.yaml | 22 +++++++++++++++-------
 charts/apisix/values.yaml              |  5 ++++-
 2 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/charts/apisix/templates/configmap.yaml b/charts/apisix/templates/configmap.yaml
index 2b7820e..a3d0883 100644
--- a/charts/apisix/templates/configmap.yaml
+++ b/charts/apisix/templates/configmap.yaml
@@ -103,13 +103,21 @@ data:
         http: 'radixtree_uri'         # radixtree_uri: match route by uri(base on radixtree)
                                       # radixtree_host_uri: match route by host + uri(base on radixtree)
         ssl: 'radixtree_sni'          # radixtree_sni: match route by SNI(base on radixtree)
-      # stream_proxy:                 # TCP/UDP proxy
-      #   tcp:                        # TCP proxy port list
-      #     - 9100
-      #     - 9101
-      #   udp:                        # UDP proxy port list
-      #     - 9200
-      #     - 9211
+      {{- if and .Values.gateway.stream.enabled (or (gt (len .Values.gateway.stream.tcp) 0) (gt (len .Values.gateway.stream.udp) 0)) }}
+      stream_proxy:                 # TCP/UDP proxy
+        {{- if gt (len .Values.gateway.stream.tcp) 0 }}
+        tcp:                        # TCP proxy port list
+          {{- range .Values.gateway.stream.tcp }}
+          - {{ . }}
+          {{- end }}
+        {{- end }}
+        {{- if gt (len .Values.gateway.stream.udp) 0 }}
+        udp:                        # UDP proxy port list
+          {{- range .Values.gateway.stream.udp }}
+          - {{ . }}
+          {{- end }}
+        {{- end }}
+      {{- end }}
       # dns_resolver:
       #   {{- range $resolver := .Values.dns.resolvers }}
       #   - {{ $resolver }}
diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml
index 641c13b..f3a5943 100644
--- a/charts/apisix/values.yaml
+++ b/charts/apisix/values.yaml
@@ -55,7 +55,10 @@ gateway:
     containerPort: 9443
     http2:
       enabled: true
-
+  stream: # L4 proxy (TCP/UDP)
+    enabled: false
+    tcp: []
+    udp: []
   ingress:
     enabled: false
     annotations: