mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-23 21:43:07 +08:00
16 lines
372 B
Go
16 lines
372 B
Go
package manager
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/onepanelio/core/model"
|
|
)
|
|
|
|
var defaultNamespaceLabelKey = labelKeyPrefix + "is-default-namespace"
|
|
|
|
func (r *ResourceManager) GetDefaultNamespace() (namespaces []*model.Namespace, err error) {
|
|
return r.kubeClient.ListNamespaces(model.ListOptions{
|
|
LabelSelector: fmt.Sprintf("%s=%s", defaultNamespaceLabelKey, "true"),
|
|
})
|
|
}
|