Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
This commit is contained in:
Keerthan Ekbote
2021-04-28 09:52:51 -04:00
parent 3f1af1ec85
commit d20efe4509
3 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ type UpstreamType struct {
type KubeUpstream struct {
ServiceName string `json:"service_name,omitempty""`
ServiceNamespace string `json:"service_namespace,omitempty"`
ServicePort int32 `json:"service_port,omitempty"`
ServicePort int32 `json:"service_port,omitempty"`
Selector map[string]string `json:"selector,omitempty"`
}
+4 -4
View File
@@ -123,10 +123,10 @@ func (factory *Factory) MeshRouter(provider string, labelSelector string) Interf
}
case strings.HasPrefix(provider, flaggerv1.GlooProvider):
return &GlooRouter{
logger: factory.logger,
flaggerClient: factory.flaggerClient,
kubeClient: factory.kubeClient,
glooClient: factory.meshClient,
logger: factory.logger,
flaggerClient: factory.flaggerClient,
kubeClient: factory.kubeClient,
glooClient: factory.meshClient,
}
case provider == flaggerv1.NGINXProvider:
return &IngressRouter{
+6 -6
View File
@@ -35,10 +35,10 @@ import (
// GlooRouter is managing Gloo route tables
type GlooRouter struct {
kubeClient kubernetes.Interface
glooClient clientset.Interface
flaggerClient clientset.Interface
logger *zap.SugaredLogger
kubeClient kubernetes.Interface
glooClient clientset.Interface
flaggerClient clientset.Interface
logger *zap.SugaredLogger
}
// Reconcile creates or updates the Gloo Edge route table
@@ -289,7 +289,7 @@ func getMethods(canary *flaggerv1.Canary) []string {
return methods
}
func getGlooUpstreamForKubeService(canary *flaggerv1.Canary, upstreamName, svcName string) *gloov1.Upstream{
func getGlooUpstreamForKubeService(canary *flaggerv1.Canary, upstreamName, svcName string) *gloov1.Upstream {
return &gloov1.Upstream{
ObjectMeta: metav1.ObjectMeta{
Name: upstreamName,
@@ -297,7 +297,7 @@ func getGlooUpstreamForKubeService(canary *flaggerv1.Canary, upstreamName, svcNa
Labels: canary.Spec.Service.Apex.Labels,
Annotations: canary.Spec.Service.Apex.Annotations,
},
UpstreamType: gloov1.UpstreamType{
UpstreamType: gloov1.UpstreamType{
Kube: gloov1.KubeUpstream{
ServiceName: svcName,
ServiceNamespace: canary.Namespace,