cr7258 commented on PR #401: URL: https://github.com/apache/apisix-helm-chart/pull/401#issuecomment-1383158499
Use [`splitList`](https://pkg.go.dev/path/filepath#SplitList) to split a string into a list of strings, and get the last value of the list. # Verify ## values.yaml ```yaml gateway: stream: enabled: true only: false tcp: - addr: 9100 tls: true - addr: 127.0.0.1:9200 - addr: 127.0.0.1:9300 tls: true ``` Install apisix helm chart. ```bash helm install apisix -n apisix apisix ``` ## Generated Config ### Deployment ```bash > kubectl get deployments -n apisix apisix -o yaml apiVersion: apps/v1 kind: Deployment metadata: name: apisix namespace: apisix ...... - containerPort: 9100 name: proxy-tcp-0 protocol: TCP - containerPort: 9200 name: proxy-tcp-1 protocol: TCP - containerPort: 9300 name: proxy-tcp-2 protocol: TCP ...... ``` ### Configmap ```bash > kubectl get configmap -n apisix apisix -oyaml apiVersion: v1 kind: ConfigMap name: apisix namespace: apisix data: config.yaml: |- ...... stream_proxy: only: false tcp: - addr: 9100 tls: true - addr: 9200 - addr: 9300 tls: true ...... ``` ### Service ```bash kubectl get service -n apisix apisix-gateway -o yaml apiVersion: v1 kind: Service metadata: name: apisix-gateway namespace: apisix ...... - name: proxy-tcp-0 nodePort: 31062 port: 9100 protocol: TCP targetPort: 9100 - name: proxy-tcp-1 nodePort: 32600 port: 9200 protocol: TCP targetPort: 9200 - name: proxy-tcp-2 nodePort: 32367 port: 9300 protocol: TCP targetPort: 9300 ...... ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
