namespacecache

package
v0.0.0-...-464067e Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: EPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorkspaceNamespaceOwnerUidLabel string = "che.eclipse.org/workspace-namespace-owner-uid"
	CheNameLabel                    string = "che.eclipse.org/che-name"
	CheNamespaceLabel               string = "che.eclipse.org/che-namespace"
	ChePartOfLabel                  string = "app.kubernetes.io/part-of"
	ChePartOfLabelValue             string = "che.eclipse.org"
	CheComponentLabel               string = "app.kubernetes.io/component"
	CheComponentLabelValue          string = "workspaces-namespace"
	CheUsernameAnnotation           string = "che.eclipse.org/username"
)

Variables

This section is empty.

Functions

func AsReconcileRequestsForNamespaces

func AsReconcileRequestsForNamespaces(obj metav1.Object, rules []EventRule) []reconcile.Request

Types

type EventRule

type EventRule struct {
	Check      func(metav1.Object) bool
	Namespaces func(metav1.Object) []string
}

type NamespaceCache

type NamespaceCache struct {
	Client          client.Client
	KnownNamespaces map[string]NamespaceInfo
	Lock            sync.Mutex
}

func NewNamespaceCache

func NewNamespaceCache(client client.Client) *NamespaceCache

func (*NamespaceCache) ExamineNamespace

func (c *NamespaceCache) ExamineNamespace(ctx context.Context, ns string) (*NamespaceInfo, error)

func (*NamespaceCache) GetAllKnownNamespaces

func (c *NamespaceCache) GetAllKnownNamespaces() []string

func (*NamespaceCache) GetNamespaceInfo

func (c *NamespaceCache) GetNamespaceInfo(ctx context.Context, namespace string) (*NamespaceInfo, error)

type NamespaceInfo

type NamespaceInfo struct {
	IsWorkspaceNamespace bool
	Username             string
	CheCluster           *types.NamespacedName
}

Jump to

Keyboard shortcuts

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