nsautoprop

package
v0.0.0-...-5ee5d88 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamespaceAutoPropagationControllerName         = "nsautoprop-controller"
	PrefixedNamespaceAutoPropagationControllerName = common.DefaultPrefix + NamespaceAutoPropagationControllerName
	EventReasonNamespaceAutoPropagation            = "NamespaceAutoPropagation"
)
View Source
const AllClustersToAdoptRegexp = `{"regexp":".*"}`

Variables

View Source
var NoAutoPropagationAnnotation = common.DefaultPrefix + "no-auto-propagation"

Functions

This section is empty.

Types

type Controller

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

NamespacesAutoPropagationController automatically propagates namespaces to all clusters without requiring a ClusterPropagationPolicy for scheduling. It

  • sets placement of federated namespaces to all clusters
  • ensures preexisting namespaces in member clusters are adopted
  • ensures adopted namespaces in member clusters are not deleted when the federated namespace is deleted

Note that since both NamespaceAutoPropagationController and global-scheduler sets the placements, if both are enabled, they will conflict with each other and reconcile indefinitely.

func NewNamespaceAutoPropagationController

func NewNamespaceAutoPropagationController(
	kubeClient kubeclient.Interface,
	informerManager informermanager.InformerManager,
	fedClient fedclient.Interface,
	clusterInformer fedcorev1a1informers.FederatedClusterInformer,
	clusterFedObjectInformer fedcorev1a1informers.ClusterFederatedObjectInformer,
	namespaceInformer corev1informers.NamespaceInformer,
	nsExcludeRegexp *regexp.Regexp,
	fedSystemNamespace string,
	metrics stats.Metrics,
	logger klog.Logger,
	workerCount int,
) (*Controller, error)

func (*Controller) HasSynced

func (c *Controller) HasSynced() bool

func (*Controller) IsControllerReady

func (c *Controller) IsControllerReady() bool

func (*Controller) Run

func (c *Controller) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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