clusteroperator

package
v0.0.0-...-5fb399e Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CoreResourceName      = "platform-operators-core"
	AggregateResourceName = "platform-operators-aggregated"

	ReasonAsExpected            = "AsExpected"
	ReasonPlatformOperatorError = "PlatformOperatorError"
)

Variables

This section is empty.

Functions

func GetReleaseVariable

func GetReleaseVariable() string

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder helps build ClusterOperatorStatus with appropriate ClusterOperatorStatusCondition and OperandVersion.

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns a builder for ClusterOperatorStatus.

func (*Builder) GetStatus

func (b *Builder) GetStatus() configv1.ClusterOperatorStatus

GetStatus returns the ClusterOperatorStatus built.

func (*Builder) WithAvailable

func (b *Builder) WithAvailable(status metav1.ConditionStatus, reason, message string) *Builder

WithAvailable sets an OperatorAvailable type condition.

func (*Builder) WithDegraded

func (b *Builder) WithDegraded(status metav1.ConditionStatus, reason, message string) *Builder

WithDegraded sets an OperatorDegraded type condition.

func (*Builder) WithProgressing

func (b *Builder) WithProgressing(status metav1.ConditionStatus, reason, message string) *Builder

WithProgressing sets an OperatorProgressing type condition.

func (*Builder) WithRelatedObject

func (b *Builder) WithRelatedObject(reference configv1.ObjectReference) *Builder

WithRelatedObject adds the reference specified to the RelatedObjects list.

func (*Builder) WithUpgradeable

func (b *Builder) WithUpgradeable(status metav1.ConditionStatus, reason, message string) *Builder

WithUpgradeable sets an OperatorUpgradeable type condition.

func (*Builder) WithVersion

func (b *Builder) WithVersion(name, version string) *Builder

WithVersion adds the specific version into the status.

func (*Builder) WithoutRelatedObject

func (b *Builder) WithoutRelatedObject(reference configv1.ObjectReference) *Builder

WithoutRelatedObject removes the reference specified from the RelatedObjects list.

func (*Builder) WithoutVersion

func (b *Builder) WithoutVersion(name string) *Builder

WithoutVersion removes the specified version from the existing status.

type Writer

type Writer struct {
	client.Client
}

Writer encapsulates logic for cluster operator object API. It is used to update ClusterOperator resource.

func NewWriter

func NewWriter(client client.Client) *Writer

NewWriter returns a new instance of Writer.

func (*Writer) UpdateStatus

func (w *Writer) UpdateStatus(ctx context.Context, existingCO *configv1.ClusterOperator, newStatus configv1.ClusterOperatorStatus) error

UpdateStatus updates the clusteroperator object with the new status specified.

Jump to

Keyboard shortcuts

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