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

TLS: allow support for different protocols on different hosts #68

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/ingress/controller/hotreload.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func createHotCfg(cfg ngx_config.Configuration, ingressCfg ingress.Configuration
if upsService == nil {
continue
}
service := createVirtualService(cfg, loc.Backend, loc, pathServiceName, server)
service := createVirtualService(loc.Backend, loc, pathServiceName, server)
path := &route.PathRouter{
Path: loc.Path,
ServiceName: pathServiceName,
Expand Down Expand Up @@ -289,7 +289,7 @@ func createHotCfg(cfg ngx_config.Configuration, ingressCfg ingress.Configuration
}
}

func createVirtualService(cfg ngx_config.Configuration, target string, loc *ingress.Location, serviceName string, server *ingress.Server) *route.VirtualService {
func createVirtualService(target string, loc *ingress.Location, serviceName string, server *ingress.Server) *route.VirtualService {
upstream := &route.Upstream{
Target: target,
Weight: DefaultTotalWeightTraffic,
Expand Down Expand Up @@ -395,7 +395,7 @@ func createHeaderCanary(cfg ngx_config.Configuration, seq int, server *ingress.S
pathCanaryServiceName := server.Hostname + loc.Path + Canary + strconv.Itoa(seq)
klog.Infof("Loc[%v%v], canary[%v], header=[%v], value=[%v]",
server.Hostname, loc.Path, pathCanaryServiceName, policy.Header, headerValue)
canaryService = createVirtualService(canary.Target, loc, pathCanaryServiceName)
canaryService = createVirtualService(canary.Target, loc, pathCanaryServiceName, server)

tagItem := &route.TagItem{
Location: route.LocHttpHeader,
Expand Down