1
This commit is contained in:
parent
806144421e
commit
a0be279a32
2 changed files with 4 additions and 1 deletions
|
@ -889,7 +889,7 @@ func (ic *GenericController) createUpstreams(data []interface{}) map[string]*ing
|
||||||
if serviceUpstream {
|
if serviceUpstream {
|
||||||
endpoint, err := ic.getServiceClusterEndpoint(svcKey, &path.Backend)
|
endpoint, err := ic.getServiceClusterEndpoint(svcKey, &path.Backend)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Failed to get service cluster endpoint for service %s: %v", svcKey, err)
|
glog.Errorf("failed to get service cluster endpoint for service %s: %v", svcKey, err)
|
||||||
} else {
|
} else {
|
||||||
upstreams[name].Endpoints = []ingress.Endpoint{endpoint}
|
upstreams[name].Endpoints = []ingress.Endpoint{endpoint}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,8 @@ import (
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
"github.com/imdario/mergo"
|
"github.com/imdario/mergo"
|
||||||
|
|
||||||
|
api "k8s.io/api/core/v1"
|
||||||
|
|
||||||
"k8s.io/ingress/core/pkg/ingress"
|
"k8s.io/ingress/core/pkg/ingress"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -36,6 +38,7 @@ func newUpstream(name string) *ingress.Backend {
|
||||||
return &ingress.Backend{
|
return &ingress.Backend{
|
||||||
Name: name,
|
Name: name,
|
||||||
Endpoints: []ingress.Endpoint{},
|
Endpoints: []ingress.Endpoint{},
|
||||||
|
Service: &api.Service{},
|
||||||
SessionAffinity: ingress.SessionAffinityConfig{
|
SessionAffinity: ingress.SessionAffinityConfig{
|
||||||
CookieSessionAffinity: ingress.CookieSessionAffinity{
|
CookieSessionAffinity: ingress.CookieSessionAffinity{
|
||||||
Locations: make(map[string][]string),
|
Locations: make(map[string][]string),
|
||||||
|
|
Loading…
Reference in a new issue