clusteroperator

package
v0.0.0-...-8c81107 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// APIGroup represents nodes.config api group.
	APIGroup = "config.openshift.io"
	// APIVersion represents version of nodes.config api.
	APIVersion = "v1"
	// APIKind represents nodes.config api kind.
	APIKind = "ClusterOperator"
)

Variables

This section is empty.

Functions

func VerifyClusterOperatorsVersion

func VerifyClusterOperatorsVersion(desiredVersion string, clusterOperatorList []*Builder,
	options ...metav1.ListOptions) (bool, error)

VerifyClusterOperatorsVersion checks if all the clusterOperators have version desiredVersion.

func WaitForAllClusteroperatorsAvailable

func WaitForAllClusteroperatorsAvailable(
	apiClient *clients.Settings, timeout time.Duration, options ...metav1.ListOptions) (bool, error)

WaitForAllClusteroperatorsAvailable waits until all clusterOperators are in available state.

func WaitForAllClusteroperatorsStopProgressing

func WaitForAllClusteroperatorsStopProgressing(
	apiClient *clients.Settings, timeout time.Duration, options ...metav1.ListOptions) (bool, error)

WaitForAllClusteroperatorsStopProgressing waits until all clusterOperators stopped progressing.

Types

type Builder

type Builder struct {
	// ClusterOperator definition. Used to create a clusterOperator object.
	Definition *configv1.ClusterOperator
	// Created clusterOperator object.
	Object *configv1.ClusterOperator
	// contains filtered or unexported fields
}

Builder provides struct for clusterOperator object.

func List

func List(apiClient *clients.Settings, options ...metav1.ListOptions) ([]*Builder, error)

List returns clusterOperators inventory.

func Pull

func Pull(apiClient *clients.Settings, clusterOperatorName string) (*Builder, error)

Pull loads an existing clusterOperator into Builder struct.

func (*Builder) Exists

func (builder *Builder) Exists() bool

Exists checks whether the given clusterOperator exists.

func (*Builder) Get

func (builder *Builder) Get() (*configv1.ClusterOperator, error)

Get fetches existing clusterOperator from cluster.

func (*Builder) GetConditionReason

func (builder *Builder) GetConditionReason(conditionType configv1.ClusterStatusConditionType) string

GetConditionReason returns the specific condition type's reason value or an empty string if it does not exist.

func (*Builder) HasDesiredVersion

func (builder *Builder) HasDesiredVersion(desiredVersion string) (bool, error)

HasDesiredVersion checks if an operator has a desiredVersion.

func (*Builder) IsAvailable

func (builder *Builder) IsAvailable() bool

IsAvailable check if the clusterOperator is available.

func (*Builder) IsDegraded

func (builder *Builder) IsDegraded() bool

IsDegraded checks if the clusterOperator is degraded.

func (*Builder) IsProgressing

func (builder *Builder) IsProgressing() bool

IsProgressing checks if the clusterOperator is progressing.

func (*Builder) WaitUntilAvailable

func (builder *Builder) WaitUntilAvailable(timeout time.Duration) error

WaitUntilAvailable waits for timeout duration or until clusterOperator is Available.

func (*Builder) WaitUntilConditionTrue

func (builder *Builder) WaitUntilConditionTrue(
	conditionType configv1.ClusterStatusConditionType, timeout time.Duration) error

WaitUntilConditionTrue waits for timeout duration or until clusterOperator gets to a specific status.

func (*Builder) WaitUntilProgressing

func (builder *Builder) WaitUntilProgressing(timeout time.Duration) error

WaitUntilProgressing waits for timeout duration or until clusterOperator is Progressing.

Jump to

Keyboard shortcuts

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