Documentation ¶
Index ¶
- Constants
- func GetReleaseVariable() string
- type Builder
- func (b *Builder) GetStatus() configv1.ClusterOperatorStatus
- func (b *Builder) WithAvailable(status metav1.ConditionStatus, reason, message string) *Builder
- func (b *Builder) WithDegraded(status metav1.ConditionStatus, reason, message string) *Builder
- func (b *Builder) WithProgressing(status metav1.ConditionStatus, reason, message string) *Builder
- func (b *Builder) WithRelatedObject(reference configv1.ObjectReference) *Builder
- func (b *Builder) WithUpgradeable(status metav1.ConditionStatus, reason, message string) *Builder
- func (b *Builder) WithVersion(name, version string) *Builder
- func (b *Builder) WithoutRelatedObject(reference configv1.ObjectReference) *Builder
- func (b *Builder) WithoutVersion(name string) *Builder
- type Writer
Constants ¶
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 ¶
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 ¶
WithoutVersion removes the specified version from the existing status.
type Writer ¶
Writer encapsulates logic for cluster operator object API. It is used to update ClusterOperator resource.
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.