Missed out `platform interface` when reused the conn for Client.
@@ -188,6 +188,12 @@ func NewWithConn(conn *grpc.ClientConn, opts ...ClientOpt) (*Client, error) {
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
if copts.defaultRuntime == "" && c.defaultns != "" {
if label, err := c.GetLabel(context.Background(), defaults.DefaultRuntimeNSLabel); err != nil {
