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)
Click to show internal directories.
Click to hide internal directories.