namespacewatch

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: UPL-1.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RancherProjectIDLabelKey = "field.cattle.io/projectId"
)

Variables

This section is empty.

Functions

func GetRancherMgmtAPIGVRForResource

func GetRancherMgmtAPIGVRForResource(resource string) schema.GroupVersionResource

GetRancherMgmtAPIGVRForResource returns a management.cattle.io/v3 GroupVersionResource structure for specified kind

Types

type NamespacesWatcher

type NamespacesWatcher struct {
	// contains filtered or unexported fields
}

NamespacesWatcher periodically checks if new namespaces are added

func GetNamespaceWatcher

func GetNamespaceWatcher() *NamespacesWatcher

func NewNamespaceWatcher

func NewNamespaceWatcher(c clipkg.Client, duration time.Duration) *NamespacesWatcher

NewNamespaceWatcher - instantiate a NamespacesWatcher context

func (*NamespacesWatcher) IsRancherReady

func (nw *NamespacesWatcher) IsRancherReady() (bool, error)

func (*NamespacesWatcher) MoveSystemNamespacesToRancherSystemProject

func (nw *NamespacesWatcher) MoveSystemNamespacesToRancherSystemProject(rancherSystemProjectID string, clusterName string) error

MoveSystemNamespacesToRancherSystemProject Updates the label & annotation with Rancher System Project ID For namespaces that have label "verrazzano.io/namespace" And that does not have a label "management.cattle.io/system-namespace" "management.cattle.io/system-namespace" namespace label indicates it is managed by Rancher

func (*NamespacesWatcher) Pause

func (nw *NamespacesWatcher) Pause()

Pause pauses the NamespaceWatch if it was running. It is safe to call Pause multiple times

func (*NamespacesWatcher) Start

func (nw *NamespacesWatcher) Start()

Start starts the NamespacesWatcher if it is not already running. It is safe to call Start multiple times, additional goroutines will not be created

Jump to

Keyboard shortcuts

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