Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Gateway supports the configuration of forwarding tcp/udp traffic. #5445

Merged
merged 1 commit into from Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions config/crds/gateway.kubesphere.io_gateways.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion config/gateway/templates/nginx-ingress.yaml
Expand Up @@ -266,7 +266,22 @@ spec:
imagePullSecrets: []
# - name: secretName


# TCP service key:value pairs
# Ref: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/exposing-tcp-udp-services.md
##
{{- if .Values.controller.tcp }}
tcp: {{ toYaml .Values.controller.tcp | nindent 4 }}
{{- end }}
# 8080: "default/example-tcp-svc:9000"


# UDP service key:value pairs
# Ref: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/exposing-tcp-udp-services.md
##
{{- if .Values.controller.udp }}
udp: {{ toYaml .Values.controller.udp | nindent 4 }}
{{- end }}
# 53: "kube-system/kube-dns:53"



3 changes: 3 additions & 0 deletions config/gateway/values.yaml
Expand Up @@ -15,6 +15,9 @@ controller:
tag: "v1.1.0"
pullPolicy: IfNotPresent
digest: ""
# add configuration of forwarding tcp/udp traffic
tcp: {}
udp: {}


service:
Expand Down
Expand Up @@ -38,6 +38,10 @@ type ControllerSpec struct {
Config map[string]string `json:"config,omitempty"`
// +optional
Scope Scope `json:"scope,omitempty"`
// +optional
TCP map[string]string `json:"tcp,omitempty"`
// +optional
UDP map[string]string `json:"udp,omitempty"`
}

type ServiceSpec struct {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.