operatorstatus

package
v0.0.0-...-df328e8 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Copyright 2024 Red Hat, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	// ReasonAsExpected is the reason for the condition when the operator is in a normal state.
	ReasonAsExpected = "AsExpected"

	// ReasonInitializing is the reason for the condition when the operator is initializing.
	ReasonInitializing = "Initializing"

	// ReasonSyncing is the reason for the condition when the operator is syncing resources.
	ReasonSyncing = "SyncingResources"

	// ReasonSyncFailed is the reason for the condition when the operator failed to sync resources.
	ReasonSyncFailed = "SyncingFailed"
)

Variables

This section is empty.

Functions

func NewClusterOperatorStatusCondition

func NewClusterOperatorStatusCondition(conditionType configv1.ClusterStatusConditionType,
	conditionStatus configv1.ConditionStatus, reason string,
	message string) configv1.ClusterOperatorStatusCondition

NewClusterOperatorStatusCondition creates a new ClusterOperatorStatusCondition.

Types

type ClusterOperatorStatusClient

type ClusterOperatorStatusClient struct {
	client.Client
	Recorder         record.EventRecorder
	ManagedNamespace string
	ReleaseVersion   string
}

ClusterOperatorStatusClient is a client for managing the status of the ClusterOperator object.

func (*ClusterOperatorStatusClient) GetOrCreateClusterOperator

func (r *ClusterOperatorStatusClient) GetOrCreateClusterOperator(ctx context.Context) (*configv1.ClusterOperator, error)

GetOrCreateClusterOperator is responsible for fetching the cluster operator should it exist, or creating a new cluster operator if it does not already exist.

func (*ClusterOperatorStatusClient) SetStatusAvailable

func (r *ClusterOperatorStatusClient) SetStatusAvailable(ctx context.Context, availableConditionMsg string) error

SetStatusAvailable sets the Available condition to True, with the given reason and message, and sets both the Progressing and Degraded conditions to False.

func (*ClusterOperatorStatusClient) SetStatusDegraded

func (r *ClusterOperatorStatusClient) SetStatusDegraded(ctx context.Context, reconcileErr error) error

SetStatusDegraded sets the Degraded condition to True, with the given reason and message, and sets the upgradeable condition. It does not modify any existing Available or Progressing conditions.

func (*ClusterOperatorStatusClient) SyncStatus

SyncStatus applies the new condition to the ClusterOperator object.

Jump to

Keyboard shortcuts

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