common

package
v4.2.0-alpha.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GeneratedByControllerVersionAnnotationKey is used to tag the machineconfigs generated by the controller with the version of the controller.
	GeneratedByControllerVersionAnnotationKey = "machineconfiguration.openshift.io/generated-by-controller-version"

	// ControllerConfigName is the name of the ControllerConfig object that controllers use
	ControllerConfigName = "machine-config-controller"
)

Variables

This section is empty.

Functions

func NewIgnConfig

func NewIgnConfig() igntypes.Config

NewIgnConfig returns an empty ignition config with version set as latest version

func WriteTerminationError

func WriteTerminationError(err error)

WriteTerminationError writes to the Kubernetes termination log.

Types

type Controller

type Controller interface {
	Run(workers int, stopCh <-chan struct{})
}

Controller is the common interface all controllers implement

type ControllerContext

type ControllerContext struct {
	ClientBuilder *clients.Builder

	NamespacedInformerFactory                    mcfginformers.SharedInformerFactory
	InformerFactory                              mcfginformers.SharedInformerFactory
	KubeInformerFactory                          informers.SharedInformerFactory
	KubeNamespacedInformerFactory                informers.SharedInformerFactory
	OpenShiftConfigKubeNamespacedInformerFactory informers.SharedInformerFactory
	APIExtInformerFactory                        apiextinformers.SharedInformerFactory
	ConfigInformerFactory                        configinformers.SharedInformerFactory

	AvailableResources map[schema.GroupVersionResource]bool

	Stop <-chan struct{}

	InformersStarted chan struct{}

	ResyncPeriod func() time.Duration
}

ControllerContext stores all the informers for a variety of kubernetes objects.

func CreateControllerContext

func CreateControllerContext(cb *clients.Builder, stop <-chan struct{}, targetNamespace string) *ControllerContext

CreateControllerContext creates the ControllerContext with the ClientBuilder.

Jump to

Keyboard shortcuts

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