Merge pull request #7699 from yanggangtony/client-with-conn
Missed out `platform interface` when reused the conn for Client.
This commit is contained in:
commit
de73676e9b
@ -188,6 +188,12 @@ func NewWithConn(conn *grpc.ClientConn, opts ...ClientOpt) (*Client, error) {
|
|||||||
runtime: fmt.Sprintf("%s.%s", plugin.RuntimePlugin, runtime.GOOS),
|
runtime: fmt.Sprintf("%s.%s", plugin.RuntimePlugin, runtime.GOOS),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if copts.defaultPlatform != nil {
|
||||||
|
c.platform = copts.defaultPlatform
|
||||||
|
} else {
|
||||||
|
c.platform = platforms.Default()
|
||||||
|
}
|
||||||
|
|
||||||
// check namespace labels for default runtime
|
// check namespace labels for default runtime
|
||||||
if copts.defaultRuntime == "" && c.defaultns != "" {
|
if copts.defaultRuntime == "" && c.defaultns != "" {
|
||||||
if label, err := c.GetLabel(context.Background(), defaults.DefaultRuntimeNSLabel); err != nil {
|
if label, err := c.GetLabel(context.Background(), defaults.DefaultRuntimeNSLabel); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user