Help us shape the future of Go! Take the 2026 Go Developer Survey

namespace

package
v1.20.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"clustermesh-namespace",
	"Clustermesh global namespace management",

	cell.Config(DefaultConfig),
	cell.Provide(
		func(params managerParams) Manager {
			return newManager(params)
		},
	),
)
View Source
var DefaultConfig = Config{
	GlobalNamespacesByDefault: true,
}

Functions

func IsGlobalNamespace added in v1.20.0

func IsGlobalNamespace(ns *corev1.Namespace, globalByDefault bool) bool

IsGlobalNamespace determines whether the given namespace should be treated as a global namespace based on its annotations and the provided default value.

Types

type Config

type Config struct {
	// GlobalNamespacesByDefault marks all namespaces as global by default unless overridden by annotation
	GlobalNamespacesByDefault bool `mapstructure:"clustermesh-default-global-namespace"`
}

func (Config) Flags

func (cfg Config) Flags(flags *pflag.FlagSet)

type Manager

type Manager interface {
	IsGlobalNamespaceByName(ns string) (bool, error)
	IsGlobalNamespaceByObject(ns *slim_corev1.Namespace) bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL