foreigncluster

package
v1.0.0-rc.1 Latest Latest
Warning

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

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

Documentation

Overview

Package foreigncluster contains shared utility methods to handle the ForeignCluster resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteGenericCondition

func DeleteGenericCondition(foreignCluster *liqov1beta1.ForeignCluster, conditionType liqov1beta1.ConditionType)

DeleteGenericCondition ensure the absence of a generic condition in the foreign cluster status.

func DeleteModuleCondition

func DeleteModuleCondition(module *liqov1beta1.Module, conditionType liqov1beta1.ConditionType)

DeleteModuleCondition ensure the absence of a condition of the given type in the module.

func DisableModuleAuthentication

func DisableModuleAuthentication(foreignCluster *liqov1beta1.ForeignCluster)

DisableModuleAuthentication disables the authentication module.

func DisableModuleNetworking

func DisableModuleNetworking(foreignCluster *liqov1beta1.ForeignCluster)

DisableModuleNetworking disables the networking module.

func DisableModuleOffloading

func DisableModuleOffloading(foreignCluster *liqov1beta1.ForeignCluster)

DisableModuleOffloading disables the offloading module.

func EnableModuleAuthentication

func EnableModuleAuthentication(foreignCluster *liqov1beta1.ForeignCluster)

EnableModuleAuthentication enables the authentication module.

func EnableModuleNetworking

func EnableModuleNetworking(foreignCluster *liqov1beta1.ForeignCluster)

EnableModuleNetworking enables the networking module.

func EnableModuleOffloading

func EnableModuleOffloading(foreignCluster *liqov1beta1.ForeignCluster)

EnableModuleOffloading enables the offloading module.

func EnsureGenericCondition

func EnsureGenericCondition(foreignCluster *liqov1beta1.ForeignCluster,
	conditionType liqov1beta1.ConditionType,
	status liqov1beta1.ConditionStatusType,
	reason, message string)

EnsureGenericCondition ensures the presence of a generic condition in the foreign cluster status.

func EnsureModuleCondition

func EnsureModuleCondition(module *liqov1beta1.Module,
	conditionType liqov1beta1.ConditionType,
	status liqov1beta1.ConditionStatusType,
	reason, message string)

EnsureModuleCondition ensures the presence of a condition in the module.

func GetAPIServerStatus

func GetAPIServerStatus(foreignCluster *liqov1beta1.ForeignCluster) liqov1beta1.ConditionStatusType

GetAPIServerStatus returns the status of the api server.

func GetForeignClusterByID

func GetForeignClusterByID(ctx context.Context, cl client.Client, clusterID liqov1beta1.ClusterID) (*liqov1beta1.ForeignCluster, error)

GetForeignClusterByID returns a ForeignCluster CR retrieving it by its clusterID.

func GetForeignClusterByIDWithDynamicClient

func GetForeignClusterByIDWithDynamicClient(ctx context.Context, dynClient dynamic.Interface, clusterID liqov1beta1.ClusterID) (
	*liqov1beta1.ForeignCluster, error)

GetForeignClusterByIDWithDynamicClient returns a ForeignCluster CR retrieving it by its clusterID, using the dynamic interface.

func GetLocalTenantNamespaceName

func GetLocalTenantNamespaceName(ctx context.Context, cl client.Client, remoteCluster liqov1beta1.ClusterID) (string, error)

GetLocalTenantNamespaceName gets the name of the local tenant namespace associated with a specific peering (remoteClusterID).

func GetMessage

func GetMessage(conditions []liqov1beta1.Condition, conditionType liqov1beta1.ConditionType) string

GetMessage returns the message for the given condition. If the condition is not set, it returns an empty string.

func GetOlderForeignCluster

func GetOlderForeignCluster(
	foreignClusterList *liqov1beta1.ForeignClusterList) (foreignCluster *liqov1beta1.ForeignCluster)

GetOlderForeignCluster returns the ForeignCluster from the list with the older creationTimestamp.

func GetReason

func GetReason(conditions []liqov1beta1.Condition, conditionType liqov1beta1.ConditionType) string

GetReason returns the reason for the given condition. If the condition is not set, it returns an empty string.

func GetRemoteTenantNamespaceName

func GetRemoteTenantNamespaceName(ctx context.Context, cl client.Client, remoteClusterID liqov1beta1.ClusterID) (string, error)

GetRemoteTenantNamespaceName gets the name of the remote tenant namespace associated with a specific peering (remoteClusterID).

func GetStatus

func GetStatus(conditions []liqov1beta1.Condition, conditionType liqov1beta1.ConditionType) liqov1beta1.ConditionStatusType

GetStatus returns the status for the given condition. If the condition is not set, it returns the None status.

func IsAPIServerReadyOrDisabled

func IsAPIServerReadyOrDisabled(foreignCluster *liqov1beta1.ForeignCluster) bool

IsAPIServerReadyOrDisabled checks if the api server is ready or not applicable.

func IsAuthenticationModuleEnabled

func IsAuthenticationModuleEnabled(foreignCluster *liqov1beta1.ForeignCluster) bool

IsAuthenticationModuleEnabled checks if the authentication module is enabled.

func IsConsumer

func IsConsumer(role liqov1beta1.RoleType) bool

IsConsumer checks if a foreign cluster is a consumer.

func IsConsumerAndProvider

func IsConsumerAndProvider(role liqov1beta1.RoleType) bool

IsConsumerAndProvider checks if a foreign cluster is both a consumer and a provider.

func IsNetworkingEstablished

func IsNetworkingEstablished(foreignCluster *liqov1beta1.ForeignCluster) bool

IsNetworkingEstablished checks if the networking is established.

func IsNetworkingEstablishedOrDisabled

func IsNetworkingEstablishedOrDisabled(foreignCluster *liqov1beta1.ForeignCluster) bool

IsNetworkingEstablishedOrDisabled checks if the networking is established or if the liqo networking module is disabled.

func IsNetworkingModuleEnabled

func IsNetworkingModuleEnabled(foreignCluster *liqov1beta1.ForeignCluster) bool

IsNetworkingModuleEnabled checks if the networking module is enabled.

func IsOffloadingModuleEnabled

func IsOffloadingModuleEnabled(foreignCluster *liqov1beta1.ForeignCluster) bool

IsOffloadingModuleEnabled checks if the offloading module is enabled.

func IsProvider

func IsProvider(role liqov1beta1.RoleType) bool

IsProvider checks if a foreign cluster is a provider.

func IsUnknown

func IsUnknown(role liqov1beta1.RoleType) bool

IsUnknown checks if a foreign cluster has an unknown role.

func PollForEvent

func PollForEvent(ctx context.Context, cl client.Client, id liqov1beta1.ClusterID,
	checker fcEventChecker, interval time.Duration) error

PollForEvent polls until the given events occurs on the foreign cluster corresponding to the identity.

func SetRole

func SetRole(foreignCluster *liqov1beta1.ForeignCluster, consumer, provider bool)

SetRole sets the role of a foreign cluster.

func UniqueName

func UniqueName(cluster liqov1beta1.ClusterID) string

UniqueName returns a unique name for the given cluster.

Types

This section is empty.

Jump to

Keyboard shortcuts

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