Documentation ¶
Index ¶
Constants ¶
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 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.