clusteridentity

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultClusterIdentityConfigMapName = "antrea-cluster-identity"
)

Variables

This section is empty.

Functions

func NewClusterIdentityProvider

func NewClusterIdentityProvider(
	clusterIdentityConfigMapNamespace string,
	clusterIdentityConfigMapName string,
	k8sClient clientset.Interface,
) *clusterIdentityProvider

NewClusterIdentityProvider returns a new object implementing the ClusterIdentityProvider interface.

Types

type ClusterIdentity

type ClusterIdentity struct {
	UUID uuid.UUID
}

type ClusterIdentityAllocator

type ClusterIdentityAllocator struct {
	// contains filtered or unexported fields
}

ClusterIdentityAllocator ensures that the antrea-cluster-identity ConfigMap is populated correctly, with a valid UUID. It is meant to be used by the Antrea Controller.

func NewClusterIdentityAllocator

func NewClusterIdentityAllocator(
	clusterIdentityConfigMapNamespace string,
	clusterIdentityConfigMapName string,
	k8sClient clientset.Interface,
) *ClusterIdentityAllocator

NewClusterIdentityAllocator creates a ClusterIdentityAllocator object

func (*ClusterIdentityAllocator) Run

func (a *ClusterIdentityAllocator) Run(stopCh <-chan struct{})

Run will ensure that the antrea-cluster-identity ConfigMap is up-to-date. It is meant to be called asynchronously in its own goroutine, and will keep retrying in case of error, using an exponential backoff mechanism.

type ClusterIdentityProvider

type ClusterIdentityProvider interface {
	Get() (ClusterIdentity, time.Time, error)
}

ClusterIdentityProvider is an interface used to retrieve the cluster identity information (UUID), as provided by the user or generated by the Antrea Controller. It also returns the time at which the antrea-cluster-identity was created, which can typically be considered as the time at which Antrea was deployed to the cluster.

Jump to

Keyboard shortcuts

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