Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultCR is the name of the global cluster-scoped ClusterResourceOverride object that // the operator will be watching for. // All other ClusterResourceOverride object(s) are ignored since the operand is // basically a cluster singleton. DefaultCR = "cluster" // Default worker count is 1. DefaultWorkerCount = 1 // Default ResyncPeriod for primary (ClusterResourceOverride objects) DefaultResyncPeriodPrimaryResource = 1 * time.Hour // Default ResyncPeriod for all secondary resources that the operator manages. DefaultResyncPeriodSecondaryResource = 15 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Name is the name of the operator. This name will be used to create kube resources. // More info: http://kubernetes.io/docs/user-guide/identifiers#names. Name string // Namespace is the namespace where the operator is installed. Namespace string // ShutdownContext is the parent context. ShutdownContext context.Context // RestConfig is the rest.Config object to be used to build clients. RestConfig *rest.Config // OperandImage points to the operand image. OperandImage string // OperandVersion points to the operand version. OperandVersion string }
type Interface ¶
type Interface interface { // Run will start a new operator instance based on the given config // Run starts the operator instance and waits indefinitely until the parent // shutdown context is done. // Run returns on any error encountered during initialization. // Any error encountered during initialization is written to the errorCh channel // specified so that the caller can take appropriate action. Run(config *Config, errorCh chan<- error) // Done returns a channel that's closed when the operator is done. Done() <-chan struct{} }
Interface defines an interface for the operator.
Click to show internal directories.
Click to hide internal directories.