apiregistration

package
v0.0.0-...-88a9ed4 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
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

Jump to

Keyboard shortcuts

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