Documentation ¶
Index ¶
- Constants
- type AutoAPIServiceRegistration
- type AutoRegisterController
- func (c *AutoRegisterController) AddAPIServiceToSync(in *v1.APIService)
- func (c *AutoRegisterController) AddAPIServiceToSyncOnStart(in *v1.APIService)
- func (c *AutoRegisterController) GetAPIServiceToSync(name string) *v1.APIService
- func (c *AutoRegisterController) RemoveAPIServiceToSync(name string)
- func (c *AutoRegisterController) Run(workers int, stopCh <-chan struct{})
- type GRDRegistrationController
Constants ¶
const (
// AutoRegisterManagedLabel is a label attached to the APIService that identifies how the APIService wants to be synced.
AutoRegisterManagedLabel = "kinds.grafana.com/automanaged"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoAPIServiceRegistration ¶
type AutoAPIServiceRegistration interface { // AddAPIServiceToSync adds an API service to auto-register. AddAPIServiceToSync(in *v1.APIService) // RemoveAPIServiceToSync removes an API service to auto-register. RemoveAPIServiceToSync(name string) }
AutoAPIServiceRegistration is an interface which callers can re-declare locally and properly cast to for adding and removing APIServices
type AutoRegisterController ¶
type AutoRegisterController struct {
// contains filtered or unexported fields
}
AutoRegisterController is used to keep a particular set of APIServices present in the API. It is useful for cases where you want to auto-register APIs like TPRs or groups from the core kube-apiserver
func NewAutoRegisterController ¶
func NewAutoRegisterController(apiServiceInformer informers.APIServiceInformer, apiServiceClient apiregistrationclient.APIServicesGetter) *AutoRegisterController
NewAutoRegisterController creates a new autoRegisterController.
func (*AutoRegisterController) AddAPIServiceToSync ¶
func (c *AutoRegisterController) AddAPIServiceToSync(in *v1.APIService)
AddAPIServiceToSync registers an API service to sync continuously.
func (*AutoRegisterController) AddAPIServiceToSyncOnStart ¶
func (c *AutoRegisterController) AddAPIServiceToSyncOnStart(in *v1.APIService)
AddAPIServiceToSyncOnStart registers an API service to sync only when the controller starts.
func (*AutoRegisterController) GetAPIServiceToSync ¶
func (c *AutoRegisterController) GetAPIServiceToSync(name string) *v1.APIService
GetAPIServiceToSync gets a single API service to sync.
func (*AutoRegisterController) RemoveAPIServiceToSync ¶
func (c *AutoRegisterController) RemoveAPIServiceToSync(name string)
RemoveAPIServiceToSync deletes a registered APIService.
func (*AutoRegisterController) Run ¶
func (c *AutoRegisterController) Run(workers int, stopCh <-chan struct{})
Run starts the autoregister controller in a loop which syncs API services until stopCh is closed.
type GRDRegistrationController ¶
type GRDRegistrationController struct {
// contains filtered or unexported fields
}
func NewGRDRegistrationController ¶
func NewGRDRegistrationController(grdinformer grdinformers.GrafanaResourceDefinitionInformer, apiServiceRegistration AutoAPIServiceRegistration, hostPort int32) *GRDRegistrationController
NewGRDRegistrationController returns a controller which will register GRD GroupVersions with the auto APIService registration controller so they automatically stay in sync.
func (*GRDRegistrationController) Run ¶
func (c *GRDRegistrationController) Run(workers int, stopCh <-chan struct{})
func (*GRDRegistrationController) WaitForInitialSync ¶
func (c *GRDRegistrationController) WaitForInitialSync()
WaitForInitialSync blocks until the initial set of GRD resources has been processed