Documentation
¶
Index ¶
- func OperatorConditionToClusterOperatorCondition(condition operatorv1.OperatorCondition) configv1.ClusterOperatorStatusCondition
- func VersionForOperand(namespace, imagePullSpec string, configMapGetter corev1client.ConfigMapsGetter, ...) string
- func VersionForOperandFromEnv() string
- func VersionForOperatorFromEnv() string
- type Inertia
- type InertiaCondition
- type InertiaConfig
- type StatusSyncer
- type VersionGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OperatorConditionToClusterOperatorCondition ¶
func OperatorConditionToClusterOperatorCondition(condition operatorv1.OperatorCondition) configv1.ClusterOperatorStatusCondition
func VersionForOperand ¶
func VersionForOperand(namespace, imagePullSpec string, configMapGetter corev1client.ConfigMapsGetter, eventRecorder events.Recorder) string
func VersionForOperandFromEnv ¶
func VersionForOperandFromEnv() string
func VersionForOperatorFromEnv ¶
func VersionForOperatorFromEnv() string
Types ¶
type Inertia ¶
type Inertia func(condition operatorv1.OperatorCondition) time.Duration
Inertia returns the inertial duration for the given condition.
type InertiaCondition ¶
type InertiaCondition struct { // ConditionTypeMatcher is a regular expression selecting condition types // with which this InertiaCondition is associated. ConditionTypeMatcher *regexp.Regexp // Duration is the inertial duration for associated conditions. Duration time.Duration }
InertiaCondition configures an inertia duration for a given set of condition types.
type InertiaConfig ¶
type InertiaConfig struct {
// contains filtered or unexported fields
}
InertiaConfig holds configuration for an Inertia implementation.
func MustNewInertia ¶
func MustNewInertia(defaultDuration time.Duration, conditions ...InertiaCondition) *InertiaConfig
MustNewInertia is like NewInertia but panics on error.
func NewInertia ¶
func NewInertia(defaultDuration time.Duration, conditions ...InertiaCondition) (*InertiaConfig, error)
NewInertia creates a new InertiaConfig object. Conditions are applied in the given order, so a condition type matching multiple regular expressions will have the duration associated with the first matching entry.
func (*InertiaConfig) Inertia ¶
func (c *InertiaConfig) Inertia(condition operatorv1.OperatorCondition) time.Duration
Inertia returns the configured inertia for the given condition type.
type StatusSyncer ¶
type StatusSyncer struct {
// contains filtered or unexported fields
}
func NewClusterOperatorStatusController ¶
func NewClusterOperatorStatusController( name string, relatedObjects []configv1.ObjectReference, clusterOperatorClient configv1client.ClusterOperatorsGetter, clusterOperatorInformer configv1informers.ClusterOperatorInformer, operatorClient operatorv1helpers.OperatorClient, versionGetter VersionGetter, recorder events.Recorder, ) *StatusSyncer
func (*StatusSyncer) Name ¶
func (c *StatusSyncer) Name() string
func (StatusSyncer) Sync ¶
func (c StatusSyncer) Sync(ctx context.Context, syncCtx factory.SyncContext) error
sync reacts to a change in prereqs by finding information that is required to match another value in the cluster. This must be information that is logically "owned" by another component.
func (*StatusSyncer) WithDegradedInertia ¶
func (c *StatusSyncer) WithDegradedInertia(inertia Inertia) *StatusSyncer
WithDegradedInertia returns a copy of the StatusSyncer with the requested inertia function for degraded conditions.
type VersionGetter ¶
type VersionGetter interface { // SetVersion is a way to set the version for an operand. It must be thread-safe SetVersion(operandName, version string) // GetVersion is way to get the versions for all operands. It must be thread-safe and return an object that doesn't mutate GetVersions() map[string]string // VersionChangedChannel is a channel that will get an item whenever SetVersion has been called VersionChangedChannel() <-chan struct{} }
func NewVersionGetter ¶
func NewVersionGetter() VersionGetter