Documentation
¶
Index ¶
Constants ¶
View Source
const ( // SuccessSynced is used as part of the Event 'reason' when a HelmRequest is synced SuccessSynced = "Synced" // FailedSync is used when a HelmRequest failed to sync FailedSync = "FailedSync" // SuccessfulDelete means successfully delete a resource SuccessfulDelete = "SuccessfulDelete" // FailedDelete means failed to delete a resource FailedDelete = "FailedDelete" // ErrResourceExists is used as part of the Event 'reason' when a HelmRequest fails // to sync due to a Deployment of the same name already existing. ErrResourceExists = "ErrResourceExists" // MessageResourceExists is the message used for Events when a resource // fails to sync due to a Deployment already existing MessageResourceExists = "Resource %q already exists and is not managed by HelmRequest" // MessageResourceSynced is the message used for an Event fired when a HelmRequest // is synced successfully MessageResourceSynced = "HelmRequest synced successfully" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// ClusterCache is used to store Cluster resource
ClusterCache *commoncache.Cache
// contains filtered or unexported fields
}
Controller is the controller implementation for HelmRequest resources
func NewController ¶
func NewController(mgr manager.Manager, opt *config.Options, stopCh <-chan struct{}) (*Controller, error)
NewController create a new controller
func (*Controller) GetClusterClient ¶
func (c *Controller) GetClusterClient() clusterclientset.Interface
GetClusterClient get a client for access Cluster resource
func (*Controller) NeedLeaderElection ¶
func (c *Controller) NeedLeaderElection() bool
NeedLeaderElection simply check token file to determine it's this a in-cluster config and enable leader-election
func (*Controller) Start ¶
func (c *Controller) Start(stopCh <-chan struct{}) error
Start will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workQueue and wait for workers to finish processing their current work items.
Click to show internal directories.
Click to hide internal directories.