labels

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package labels label selectors used throughout the liqo code in order to get k8s resources.

Index

Constants

This section is empty.

Variables

View Source
var (
	// IPAMStorageLabelSelector selector used to get the ipam storage instance.
	IPAMStorageLabelSelector = metav1.LabelSelector{
		MatchExpressions: []metav1.LabelSelectorRequirement{
			{
				Key:      liqoconst.IpamStorageResourceLabelKey,
				Operator: metav1.LabelSelectorOpIn,
				Values:   []string{liqoconst.IpamStorageResourceLabelValue},
			},
		},
	}

	// GatewayServiceLabelSelector selector used to get the gateway service.
	GatewayServiceLabelSelector = metav1.LabelSelector{
		MatchExpressions: []metav1.LabelSelectorRequirement{
			{
				Key:      liqoconst.GatewayServiceLabelKey,
				Operator: metav1.LabelSelectorOpIn,
				Values:   []string{liqoconst.GatewayServiceLabelValue},
			},
		},
	}

	// WireGuardSecretLabelSelector selector used to get the WireGuard secret.
	WireGuardSecretLabelSelector = metav1.LabelSelector{
		MatchExpressions: []metav1.LabelSelectorRequirement{
			{
				Key:      liqoconst.KeysLabel,
				Operator: metav1.LabelSelectorOpIn,
				Values:   []string{liqoconst.DriverName},
			},
		},
	}

	// ClusterIDConfigMapLabelSelector selector used to get the cluster id configmap.
	ClusterIDConfigMapLabelSelector = metav1.LabelSelector{
		MatchExpressions: []metav1.LabelSelectorRequirement{
			{
				Key:      liqoconst.K8sAppNameKey,
				Operator: metav1.LabelSelectorOpIn,
				Values:   []string{liqoconst.ClusterIDConfigMapNameLabelValue},
			},
		},
	}

	// NetworkManagerPodLabelSelector selector used to get the Network Manager Pod.
	NetworkManagerPodLabelSelector = metav1.LabelSelector{
		MatchExpressions: []metav1.LabelSelectorRequirement{
			{
				Key:      liqoconst.K8sAppNameKey,
				Operator: metav1.LabelSelectorOpIn,
				Values:   []string{liqoconst.NetworkManagerAppName},
			},
		},
	}

	// AuthServiceLabelSelector selector used to get the auth service.
	AuthServiceLabelSelector = metav1.LabelSelector{
		MatchExpressions: []metav1.LabelSelectorRequirement{
			{
				Key:      liqoconst.K8sAppNameKey,
				Operator: metav1.LabelSelectorOpIn,
				Values:   []string{liqoconst.AuthAppName},
			},
		},
	}

	// ProxyServiceLabelSelector selector used to get the gateway service.
	ProxyServiceLabelSelector = metav1.LabelSelector{
		MatchExpressions: []metav1.LabelSelectorRequirement{
			{
				Key:      liqoconst.K8sAppNameKey,
				Operator: metav1.LabelSelectorOpIn,
				Values:   []string{liqoconst.APIServerProxyAppName},
			},
		},
	}
)

Functions

func ComponentLabelSelector added in v0.6.0

func ComponentLabelSelector(name, component string) labels.Selector

ComponentLabelSelector returns the label selector associated with the component characterized by the given name and component labels.

func ControllerManagerLabelSelector added in v0.6.0

func ControllerManagerLabelSelector() labels.Selector

ControllerManagerLabelSelector returns the label selector associated with the controller-manager components.

func DiscoveryLabelSelector added in v0.6.0

func DiscoveryLabelSelector() labels.Selector

DiscoveryLabelSelector returns the label selector associated with the discovery components.

func GatewayLabelSelector added in v0.6.0

func GatewayLabelSelector() labels.Selector

GatewayLabelSelector returns the label selector associated with the gateway components.

func LocalLabelSelector added in v0.5.0

func LocalLabelSelector() labels.Selector

LocalLabelSelector returns a label selector to match local resources.

func LocalLabelSelectorForCluster added in v0.6.0

func LocalLabelSelectorForCluster(destinationClusterID string) labels.Selector

LocalLabelSelectorForCluster returns a label selector to match local resources with a given destination ClusterID.

func RemoteLabelSelector added in v0.5.0

func RemoteLabelSelector() labels.Selector

RemoteLabelSelector returns a label selector to match local resources.

func RemoteLabelSelectorForCluster added in v0.6.0

func RemoteLabelSelectorForCluster(originClusterID string) labels.Selector

RemoteLabelSelectorForCluster returns a label selector to match remote resources with a given origin ClusterID.

func RouteLabelSelector added in v0.6.0

func RouteLabelSelector() labels.Selector

RouteLabelSelector returns the label selector associated with the route components.

Types

This section is empty.

Jump to

Keyboard shortcuts

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