Skip to content

Commit 2c51721

Browse files
committed
grpc tls fix
Signed-off-by: alyssacgoins <[email protected]>
1 parent f0b01b6 commit 2c51721

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backend/src/apiserver/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ import (
2828
"strings"
2929
"sync"
3030

31-
"google.golang.org/grpc/credentials"
32-
3331
"github.com/fsnotify/fsnotify"
3432
"github.com/golang/glog"
3533
"github.com/gorilla/mux"
@@ -50,6 +48,7 @@ import (
5048
"github.com/spf13/viper"
5149
"go.uber.org/zap/zapcore"
5250
"google.golang.org/grpc"
51+
"google.golang.org/grpc/credentials"
5352
"google.golang.org/grpc/reflection"
5453
corev1 "k8s.io/api/core/v1"
5554
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
@@ -99,6 +98,7 @@ func initCerts() (*tls.Config, error) {
9998
return nil, err
10099
}
101100
tlsCfg := &tls.Config{
101+
ServerName: common.GetMLPipelineServiceName() + "." + common.GetPodNamespace() + ".svc.cluster.local",
102102
Certificates: []tls.Certificate{serverCert},
103103
}
104104
glog.Info("TLS cert key/pair loaded.")

backend/src/v2/config/env.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func getDefaultMinioSessionInfo() (objectstore.SessionInfo, error) {
194194

195195
func GetMLPipelineServerConfig() *ServerConfig {
196196
return &ServerConfig{
197-
Address: common.GetMLPipelineServiceName() + "." + common.GetPodNamespace(),
197+
Address: common.GetMLPipelineServiceName() + "." + common.GetPodNamespace() + ".svc.cluster.local",
198198
Port: mlPipelineGrpcServicePort,
199199
}
200200
}

0 commit comments

Comments
 (0)