Documentation ¶
Index ¶
Constants ¶
const ( LeaderCluster = "leader" MemberCluster = "member" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StaleResCleanupController ¶ added in v1.7.0
type StaleResCleanupController struct { client.Client Scheme *runtime.Scheme // contains filtered or unexported fields }
StaleResCleanupController will clean up ServiceImport, MC Service, ACNP, ClusterInfoImport and LabelIdentity resources if no corresponding ResourceImports in the leader cluster and remove stale ResourceExports in the leader cluster if no corresponding ServiceExport or Gateway in the member cluster when it runs in the member cluster. It will clean up stale MemberClusterAnnounce resources in the leader cluster if no corresponding member cluster in the ClusterSet.Spec.Members when it runs in the leader cluster.
func NewStaleResCleanupController ¶ added in v1.7.0
func NewStaleResCleanupController( Client client.Client, Scheme *runtime.Scheme, namespace string, commonAreaGetter commonarea.RemoteCommonAreaGetter, clusterRole string, ) *StaleResCleanupController
func (*StaleResCleanupController) Enqueue ¶ added in v1.7.0
func (c *StaleResCleanupController) Enqueue()
Enqueue will be called after StaleResCleanupController is initialized.
func (*StaleResCleanupController) Run ¶ added in v1.7.0
func (c *StaleResCleanupController) Run(stopCh <-chan struct{})
Run starts the StaleResCleanupController and blocks until stopCh is closed. it will run only once to clean up stale resources if no error happens.
Directories ¶
Path | Synopsis |
---|---|
Package commonarea is a generated GoMock package.
|
Package commonarea is a generated GoMock package. |
memberclusterannounce_controller is for leader cluster only.
|
memberclusterannounce_controller is for leader cluster only. |