From 229250f419d50f212d19d24d9c9926bb07f41755 Mon Sep 17 00:00:00 2001 From: caiyixiang Date: Tue, 7 Feb 2017 14:35:39 +0800 Subject: [PATCH] changeUDP --- controllers/nginx/pkg/cmd/controller/nginx.go | 2 +- core/pkg/ingress/controller/controller.go | 2 +- core/pkg/ingress/types.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/nginx/pkg/cmd/controller/nginx.go b/controllers/nginx/pkg/cmd/controller/nginx.go index 9e2bb64d23..456ffacf08 100644 --- a/controllers/nginx/pkg/cmd/controller/nginx.go +++ b/controllers/nginx/pkg/cmd/controller/nginx.go @@ -331,7 +331,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) ([]byte, er PassthroughBackends: ingressCfg.PassthroughBackends, Servers: ingressCfg.Servers, TCPBackends: ingressCfg.TCPEndpoints, - UDPBackends: ingressCfg.UPDEndpoints, + UDPBackends: ingressCfg.UDPEndpoints, HealthzURI: ngxHealthPath, CustomErrors: len(cfg.CustomHTTPErrors) > 0, Cfg: cfg, diff --git a/core/pkg/ingress/controller/controller.go b/core/pkg/ingress/controller/controller.go index 0fecef961d..5c979dcce9 100644 --- a/core/pkg/ingress/controller/controller.go +++ b/core/pkg/ingress/controller/controller.go @@ -391,7 +391,7 @@ func (ic *GenericController) sync(key interface{}) error { Backends: upstreams, Servers: servers, TCPEndpoints: ic.getStreamServices(ic.cfg.TCPConfigMapName, api.ProtocolTCP), - UPDEndpoints: ic.getStreamServices(ic.cfg.UDPConfigMapName, api.ProtocolUDP), + UDPEndpoints: ic.getStreamServices(ic.cfg.UDPConfigMapName, api.ProtocolUDP), PassthroughBackends: passUpstreams, }) if err != nil { diff --git a/core/pkg/ingress/types.go b/core/pkg/ingress/types.go index 4891995e7e..49f849a57f 100644 --- a/core/pkg/ingress/types.go +++ b/core/pkg/ingress/types.go @@ -113,9 +113,9 @@ type Configuration struct { // TCPEndpoints contain endpoints for tcp streams handled by this backend // +optional TCPEndpoints []*Location `json:"tcpEndpoints,omitempty"` - // UPDEndpoints contain endpoints for udp streams handled by this backend + // UDPEndpoints contain endpoints for udp streams handled by this backend // +optional - UPDEndpoints []*Location `json:"udpEndpoints,omitempty"` + UDPEndpoints []*Location `json:"udpEndpoints,omitempty"` // PassthroughBackend contains the backends used for SSL passthrough. // It contains information about the associated Server Name Indication (SNI). // +optional