Documentation ¶
Index ¶
- Constants
- func AppendCondition(ctx context.Context, c client.Client, object client.Object, typeName string, ...) error
- func ContainConditionStatus(mgh *operatorv1alpha3.MulticlusterGlobalHub, typeName string, ...) bool
- func ContainConditionStatusReason(mgh *operatorv1alpha3.MulticlusterGlobalHub, typeName, reason string, ...) bool
- func ContainsCondition(mgh *operatorv1alpha3.MulticlusterGlobalHub, typeName string) bool
- func DeleteCondition(ctx context.Context, c client.Client, ...) error
- func FailToSetConditionError(condition string, err error) error
- func GetConditionStatus(mgh *operatorv1alpha3.MulticlusterGlobalHub, typeName string) metav1.ConditionStatus
- func SetCondition(ctx context.Context, c client.Client, ...) error
- func SetConditionDatabaseInit(ctx context.Context, c client.Client, ...) error
- func SetConditionGrafanaAvailable(ctx context.Context, c client.Client, ...) error
- func SetConditionLeafHubDeployed(ctx context.Context, c client.Client, ...) error
- func SetConditionMCHConfigured(ctx context.Context, c client.Client, ...) error
- func SetConditionManagerAvailable(ctx context.Context, c client.Client, ...) error
- func SetConditionTransportInit(ctx context.Context, c client.Client, ...) error
- func UpdateCondition(ctx context.Context, c client.Client, ...) error
- type ICondition
- type SetConditionFunc
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 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 GetConditionStatus ¶
func GetConditionStatus(mgh *operatorv1alpha3.MulticlusterGlobalHub, typeName string) metav1.ConditionStatus
func SetCondition ¶
func SetCondition(ctx context.Context, c client.Client, mgh *operatorv1alpha3.MulticlusterGlobalHub, typeName string, status metav1.ConditionStatus, reason string, message string, ) error
func SetConditionDatabaseInit ¶
func SetConditionDatabaseInit(ctx context.Context, c client.Client, mgh *operatorv1alpha3.MulticlusterGlobalHub, status metav1.ConditionStatus, ) 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 SetConditionTransportInit ¶
func SetConditionTransportInit(ctx context.Context, c client.Client, mgh *operatorv1alpha3.MulticlusterGlobalHub, status metav1.ConditionStatus, ) error
func UpdateCondition ¶ added in v0.7.0
func UpdateCondition(ctx context.Context, c client.Client, mgh *operatorv1alpha3.MulticlusterGlobalHub, cond metav1.Condition, ) error
Types ¶
type ICondition ¶
type SetConditionFunc ¶
type SetConditionFunc func(ctx context.Context, c client.Client, mgh *operatorv1alpha3.MulticlusterGlobalHub, status metav1.ConditionStatus) error
SetConditionFunc is function type that receives the concrete condition method
Click to show internal directories.
Click to hide internal directories.