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

fix(config): use private port for mgmt-backend #307

Merged
Merged
Show file tree
Hide file tree
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 config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ type TritonServerConfig struct {

// MgmtBackendConfig related to mgmt-backend
type MgmtBackendConfig struct {
Host string `koanf:"host"`
PublicPort int `koanf:"publicport"`
HTTPS struct {
Host string `koanf:"host"`
PrivatePort int `koanf:"privateport"`
HTTPS struct {
Cert string `koanf:"cert"`
Key string `koanf:"key"`
}
Expand Down
2 changes: 1 addition & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tritonserver:
modelstore: /model-repository
mgmtbackend:
host: mgmt-backend
publicport: 3084
privateport: 3084
https:
cert:
key:
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -950,8 +950,6 @@ github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/instill-ai/protogen-go v0.3.3-alpha.0.20230311161800-000e8cb60385 h1:s1HBz/jqcXWI+1iECP2t6epkFLncLjsgJr69CGVRMF8=
github.com/instill-ai/protogen-go v0.3.3-alpha.0.20230311161800-000e8cb60385/go.mod h1:7/Jj3ATVozPwB0WmKRM612o/k5UJF8K9oRCNKYH8iy0=
github.com/instill-ai/protogen-go v0.3.3-alpha.0.20230314172914-1976737846cb h1:CxIAqYo7klOycw/qzTAmQJ0JHn74UuJjUzssPAF4KNw=
github.com/instill-ai/protogen-go v0.3.3-alpha.0.20230314172914-1976737846cb/go.mod h1:7/Jj3ATVozPwB0WmKRM612o/k5UJF8K9oRCNKYH8iy0=
github.com/instill-ai/usage-client v0.2.2-alpha h1:EQyHpgzZ26TEIL9UoaqchTf+LnKaidUGhKlUEFR68I8=
Expand Down
2 changes: 1 addition & 1 deletion internal/external/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func InitMgmtPrivateServiceClient() (mgmtPB.MgmtPrivateServiceClient, *grpc.Clie
clientDialOpts = grpc.WithTransportCredentials(insecure.NewCredentials())
}

clientConn, err := grpc.Dial(fmt.Sprintf("%v:%v", config.Config.MgmtBackend.Host, config.Config.MgmtBackend.PublicPort), clientDialOpts)
clientConn, err := grpc.Dial(fmt.Sprintf("%v:%v", config.Config.MgmtBackend.Host, config.Config.MgmtBackend.PrivatePort), clientDialOpts)
if err != nil {
logger.Fatal(err.Error())
}
Expand Down