请教一下,使用 kubesphere.io/client-go 创建Kubernetes原生对象(比如 limitrange)时,如何指定资源所在的Namespace?
在Create
方法的定义中,没有找到合适的CreateOption
用来指定Namespace。
// Writer knows how to create, delete, and update Kubernetes objects.
type Writer interface {
// Create saves the object obj in the Kubernetes cluster.
Create(ctx context.Context, obj runtime.Object, opts ...CreateOption) error
......
}