controllers

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceManagedByLabelValue = "ssp-operator-services"
	MetricsServiceName         = "ssp-operator-metrics"
	OperatorName               = "ssp-operator"
	ServiceControllerName      = "service-controller"
)
View Source
const (
	OlmNameLabel      = "olm.webhook-description-generate-name"
	OlmNameLabelValue = "validation.ssp.kubevirt.io"
)

Variables

This section is empty.

Functions

func ServiceObject

func ServiceObject(namespace string, appKubernetesPartOfValue string) *v1.Service

func StartControllers

func StartControllers(ctx context.Context, mgr controllerruntime.Manager, controllers []Controller) error

Types

type Controller

type Controller interface {
	Name() string
	AddToManager(mgr ctrl.Manager, crdList crd_watch.CrdList) error
	RequiredCrds() []string
}

func CreateControllers

func CreateControllers(ctx context.Context, apiReader client.Reader) ([]Controller, error)

func CreateServiceController

func CreateServiceController() (Controller, error)

func NewSspController

func NewSspController(infrastructureTopology osconfv1.TopologyMode, operands []operands.Operand) Controller

func NewVmController

func NewVmController() Controller

func NewWebhookConfigurationController

func NewWebhookConfigurationController() Controller

CreateWebhookConfigurationController creates a controller that watches ValidatingWebhookConfiguration created by OLM, and removes any namespaceSelector defined in it.

The OLM limits the webhook scope to the namespaces that are defined in the OperatorGroup by setting namespaceSelector in the ValidatingWebhookConfiguration. We would like our webhook to intercept requests from all namespaces.

The SSP operator already watches all ValidatingWebhookConfigurations, because of template validator operand, so this controller is not a performance issue.

type ControllerReconciler

type ControllerReconciler interface {
	reconcile.Reconciler

	Start(ctx context.Context, mgr ctrl.Manager) error
	Name() string
}

Jump to

Keyboard shortcuts

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