mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-19 03:44:34 +08:00
16 lines
352 B
Go
16 lines
352 B
Go
package manager
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/onepanelio/core/model"
|
|
)
|
|
|
|
var onepanelEnabledLabelKey = labelKeyPrefix + "enabled"
|
|
|
|
func (r *ResourceManager) ListNamespaces() (namespaces []*model.Namespace, err error) {
|
|
return r.kubeClient.ListNamespaces(model.ListOptions{
|
|
LabelSelector: fmt.Sprintf("%s=%s", onepanelEnabledLabelKey, "true"),
|
|
})
|
|
}
|