condition

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONDITION_STATUS_TRUE    = "True"
	CONDITION_STATUS_FALSE   = "False"
	CONDITION_STATUS_UNKNOWN = "Unknown"
)
View Source
const (
	CONDITION_TYPE_GRAFANA_AVAILABLE    = "GrafanaAvailable"
	CONDITION_REASON_GRAFANA_AVAILABLE  = "DeployedButNotReady"
	CONDITION_MESSAGE_GRAFANA_AVAILABLE = "Multicluster Global Hub Grafana has been deployed"
)

NOTE: the status of GrafanaInitialized can be True or False

View Source
const (
	CONDITION_TYPE_DATABASE_INIT    = "DatabaseInitialized"
	CONDITION_REASON_DATABASE_INIT  = "DatabaseInitialized"
	CONDITION_MESSAGE_DATABASE_INIT = "Database has been initialized"
)

NOTE: the status of DatabaseInitialized can be True or False

View Source
const (
	CONDITION_TYPE_TRANSPORT_INIT    = "TransportInitialized"
	CONDITION_REASON_TRANSPORT_INIT  = "TransportInitialized"
	CONDITION_MESSAGE_TRANSPORT_INIT = "Transport has been initialized"
)

NOTE: the status of TransportInitialized can be True or False

View Source
const (
	CONDITION_TYPE_MANAGER_AVAILABLE    = "ManagerAvailable"
	CONDITION_REASON_MANAGER_AVAILABLE  = "DeployedButNotReady"
	CONDITION_MESSAGE_MANAGER_AVAILABLE = "Multicluster Global Hub Manager has been deployed"
)

NOTE: the status of ManagerDeployed can only be True; otherwise there is no condition

View Source
const (
	CONDITION_TYPE_MCH_CONFIGURED    = "MCHConfigured"
	CONDITION_REASON_MCH_CONFIGURED  = "MCHConfigured"
	CONDITION_MESSAGE_MCH_CONFIGURED = "MultiClusterHub instance has been configured"
)

NOTE: the status of MCHConfigured can only be True; otherwise there is no condition

View Source
const (
	CONDITION_TYPE_LEAFHUB_DEPLOY           = "LeafHubDeployed"
	CONDITION_REASON_LEAFHUB_DEPLOY         = "LeafHubDeployed"
	CONDITION_MESSAGE_LEAFHUB_DEPLOY        = "Leaf Hub Deployed"
	CONDITION_REASON_LEAFHUB_DEPLOY_FAILED  = "LeafHubDeployFailed"
	CONDITION_MESSAGE_LEAFHUB_DEPLOY_FAILED = "Leaf Hub Deployed FAILED"
)

NOTE: the status of LeafHubDeployed can only be True; otherwise there is no condition

Variables

This section is empty.

Functions

func AppendCondition

func AppendCondition(ctx context.Context, c client.Client, object client.Object, typeName string,
	status metav1.ConditionStatus, reason string, message string,
) error

func ContainConditionStatus

func ContainConditionStatus(mgh *operatorv1alpha3.MulticlusterGlobalHub, typeName string,
	status metav1.ConditionStatus,
) bool

func ContainConditionStatusReason

func ContainConditionStatusReason(mgh *operatorv1alpha3.MulticlusterGlobalHub,
	typeName, reason string, status metav1.ConditionStatus,
) bool

func ContainsCondition

func ContainsCondition(mgh *operatorv1alpha3.MulticlusterGlobalHub, typeName string) bool

func DeleteCondition

func DeleteCondition(ctx context.Context, c client.Client, mgh *operatorv1alpha3.MulticlusterGlobalHub,
	typeName string, reason string,
) error

func FailToSetConditionError

func FailToSetConditionError(condition string, err error) error

func SetCondition

func SetCondition(ctx context.Context, c client.Client, mgh *operatorv1alpha3.MulticlusterGlobalHub, typeName string,
	status metav1.ConditionStatus, reason string, message string,
) error

func SetConditionGrafanaAvailable added in v0.7.0

func SetConditionGrafanaAvailable(ctx context.Context, c client.Client, mgh *operatorv1alpha3.MulticlusterGlobalHub,
	status metav1.ConditionStatus,
) error

func SetConditionLeafHubDeployed

func SetConditionLeafHubDeployed(ctx context.Context, c client.Client, mgh *operatorv1alpha3.MulticlusterGlobalHub,
	clusterName string, status metav1.ConditionStatus,
) error

func SetConditionMCHConfigured added in v0.7.0

func SetConditionMCHConfigured(ctx context.Context, c client.Client, mgh *operatorv1alpha3.MulticlusterGlobalHub,
	status metav1.ConditionStatus,
) error

func SetConditionManagerAvailable added in v0.7.0

func SetConditionManagerAvailable(ctx context.Context, c client.Client, mgh *operatorv1alpha3.MulticlusterGlobalHub,
	status metav1.ConditionStatus,
) error

func UpdateCondition added in v0.7.0

Types

type ICondition

type ICondition interface {
	GetConditions() []metav1.Condition
	SetConditions([]metav1.Condition)
}

type SetConditionFunc

SetConditionFunc is function type that receives the concrete condition method

Jump to

Keyboard shortcuts

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