Documentation ¶
Index ¶
- Variables
- func RunCSRApproverController(ctx context.Context, controllerCtx *EnhancedControllerContext) (bool, error)
- func RunClusterQuotaReconciliationController(ctx context.Context, controllerCtx *EnhancedControllerContext) (bool, error)
- func RunNamespaceSecurityAllocationController(ctx context.Context, controllerCtx *EnhancedControllerContext) (bool, error)
- func RunResourceQuotaManager(ctx context.Context, controllerCtx *EnhancedControllerContext) (bool, error)
- type ControllerClientBuilder
- type EnhancedControllerContext
- type InitFunc
- type OpenshiftControllerClientBuilder
- func (b OpenshiftControllerClientBuilder) OpenshiftImageClient(name string) (imageclient.Interface, error)
- func (b OpenshiftControllerClientBuilder) OpenshiftImageClientOrDie(name string) imageclient.Interface
- func (b OpenshiftControllerClientBuilder) OpenshiftQuotaClient(name string) (quotaclient.Interface, error)
- func (b OpenshiftControllerClientBuilder) OpenshiftQuotaClientOrDie(name string) quotaclient.Interface
- func (b OpenshiftControllerClientBuilder) OpenshiftSecurityClient(name string) (securityinternalclient.Interface, error)
- func (b OpenshiftControllerClientBuilder) OpenshiftSecurityClientOrDie(name string) securityinternalclient.Interface
Constants ¶
This section is empty.
Variables ¶
var ControllerInitializers = map[string]InitFunc{ "openshift.io/namespace-security-allocation": RunNamespaceSecurityAllocationController, "openshift.io/resourcequota": RunResourceQuotaManager, "openshift.io/cluster-quota-reconciliation": RunClusterQuotaReconciliationController, "openshift.io/cluster-csr-approver": RunCSRApproverController, "openshift.io/podsecurity-admission-label-syncer": runPodSecurityAdmissionLabelSynchronizationController, "openshift.io/privileged-namespaces-psa-label-syncer": runPrivilegedNamespacesPSALabelSyncer, }
Functions ¶
func RunCSRApproverController ¶
func RunCSRApproverController(ctx context.Context, controllerCtx *EnhancedControllerContext) (bool, error)
func RunClusterQuotaReconciliationController ¶
func RunClusterQuotaReconciliationController(ctx context.Context, controllerCtx *EnhancedControllerContext) (bool, error)
func RunNamespaceSecurityAllocationController ¶
func RunNamespaceSecurityAllocationController(ctx context.Context, controllerCtx *EnhancedControllerContext) (bool, error)
func RunResourceQuotaManager ¶
func RunResourceQuotaManager(ctx context.Context, controllerCtx *EnhancedControllerContext) (bool, error)
Types ¶
type ControllerClientBuilder ¶
type ControllerClientBuilder interface { clientbuilder.ControllerClientBuilder OpenshiftSecurityClient(name string) (securityinternalclient.Interface, error) OpenshiftSecurityClientOrDie(name string) securityinternalclient.Interface OpenshiftImageClient(name string) (imageclient.Interface, error) OpenshiftImageClientOrDie(name string) imageclient.Interface OpenshiftQuotaClient(name string) (quotaclient.Interface, error) OpenshiftQuotaClientOrDie(name string) quotaclient.Interface }
type EnhancedControllerContext ¶
type EnhancedControllerContext struct { *controllercmd.ControllerContext OpenshiftControllerConfig openshiftcontrolplanev1.OpenShiftControllerManagerConfig // ClientBuilder will provide a client for this controller to use ClientBuilder ControllerClientBuilder KubernetesInformers informers.SharedInformerFactory MetadataInformers metadatainformer.SharedInformerFactory QuotaInformers quotainformer.SharedInformerFactory ImageInformers imageinformer.SharedInformerFactory SecurityInformers securityinformer.SharedInformerFactory GenericResourceInformer genericinformers.GenericResourceInformer // InformersStarted is closed after all of the controllers have been initialized and are running. After this point it is safe, // for an individual controller to start the shared informers. Before it is closed, they should not. InformersStarted chan struct{} // contains filtered or unexported fields }
func NewControllerContext ¶
func NewControllerContext( ctx context.Context, controllerContext *controllercmd.ControllerContext, config openshiftcontrolplanev1.OpenShiftControllerManagerConfig, ) (*EnhancedControllerContext, error)
func (*EnhancedControllerContext) IsControllerEnabled ¶
func (c *EnhancedControllerContext) IsControllerEnabled(name string) bool
func (*EnhancedControllerContext) StartInformers ¶
func (c *EnhancedControllerContext) StartInformers(stopCh <-chan struct{})
func (*EnhancedControllerContext) ToGenericInformer ¶
func (c *EnhancedControllerContext) ToGenericInformer() genericinformers.GenericResourceInformer
type InitFunc ¶
type InitFunc func(ctx context.Context, controllerCtx *EnhancedControllerContext) (bool, error)
InitFunc is used to launch a particular controller. It may run additional "should I activate checks". Any error returned will cause the controller process to `Fatal` The bool indicates whether the controller was enabled.
type OpenshiftControllerClientBuilder ¶
type OpenshiftControllerClientBuilder struct {
clientbuilder.ControllerClientBuilder
}
func (OpenshiftControllerClientBuilder) OpenshiftImageClient ¶
func (b OpenshiftControllerClientBuilder) OpenshiftImageClient(name string) (imageclient.Interface, error)
OpenshiftImageClient provides a REST client for the image API. If the client cannot be created because of configuration error, this function will error.
func (OpenshiftControllerClientBuilder) OpenshiftImageClientOrDie ¶
func (b OpenshiftControllerClientBuilder) OpenshiftImageClientOrDie(name string) imageclient.Interface
OpenshiftImageClientOrDie provides a REST client for the image API. If the client cannot be created because of configuration error, this function will panic.
func (OpenshiftControllerClientBuilder) OpenshiftQuotaClient ¶
func (b OpenshiftControllerClientBuilder) OpenshiftQuotaClient(name string) (quotaclient.Interface, error)
func (OpenshiftControllerClientBuilder) OpenshiftQuotaClientOrDie ¶
func (b OpenshiftControllerClientBuilder) OpenshiftQuotaClientOrDie(name string) quotaclient.Interface
OpenshiftInternalBuildClientOrDie provides a REST client for the build API. If the client cannot be created because of configuration error, this function will panic.
func (OpenshiftControllerClientBuilder) OpenshiftSecurityClient ¶
func (b OpenshiftControllerClientBuilder) OpenshiftSecurityClient(name string) (securityinternalclient.Interface, error)
func (OpenshiftControllerClientBuilder) OpenshiftSecurityClientOrDie ¶
func (b OpenshiftControllerClientBuilder) OpenshiftSecurityClientOrDie(name string) securityinternalclient.Interface