common

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AntreaMCServiceAnnotation = "multicluster.antrea.io/imported-service"
	AntreaMCACNPAnnotation    = "multicluster.antrea.io/imported-acnp"
	GatewayAnnotation         = "multicluster.antrea.io/gateway"
	GatewayIPAnnotation       = "multicluster.antrea.io/gateway-ip"

	AntreaMCSPrefix                = "antrea-mc-"
	ServiceKind                    = "Service"
	EndpointsKind                  = "Endpoints"
	AntreaClusterNetworkPolicyKind = "AntreaClusterNetworkPolicy"
	LabelIdentityKind              = "LabelIdentity"
	ServiceImportKind              = "ServiceImport"
	ClusterInfoKind                = "ClusterInfo"

	SourceName      = "sourceName"
	SourceNamespace = "sourceNamespace"
	SourceClusterID = "sourceClusterID"
	SourceKind      = "sourceKind"

	DefaultWorkerCount = 5

	ResourceExportFinalizer = "resourceexport.finalizers.antrea.io"
)
View Source
const (
	InvalidClusterID    = ClusterID("invalid")
	InvalidClusterSetID = ClusterSetID("invalid")
)

Variables

This section is empty.

Functions

func FilterEndpointSubsets

func FilterEndpointSubsets(subsets []corev1.EndpointSubset) []corev1.EndpointSubset

FilterEndpointSubsets keeps IPs only and removes other fields from EndpointSubset which are unnecessary information for other member clusters.

func GetServiceEndpointPorts added in v1.7.0

func GetServiceEndpointPorts(ports []corev1.ServicePort) []corev1.EndpointPort

GetServiceEndpointPorts converts Service's port to EndpointPort

func GetServiceEndpointSubset added in v1.7.0

func GetServiceEndpointSubset(svc *corev1.Service) corev1.EndpointSubset

func HashLabelIdentity added in v1.9.0

func HashLabelIdentity(l string) string

HashLabelIdentity generates a hash value for label identity string.

func NamespacedName

func NamespacedName(namespace, name string) string

TODO: Use NamespacedName stringer method instead of this. e.g. nsName.String()

func RemoveStringFromSlice

func RemoveStringFromSlice(slice []string, s string) (result []string)

func StringExistsInSlice

func StringExistsInSlice(slice []string, s string) bool

Types

type ClusterID

type ClusterID string

type ClusterSetID

type ClusterSetID string

Jump to

Keyboard shortcuts

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