Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClusterConfig ¶ added in v1.13.0
func GetClusterConfig(clusterName string, backend kvstore.BackendOperations) (*cmtypes.CiliumClusterConfig, error)
func SetClusterConfig ¶ added in v1.13.0
func SetClusterConfig(clusterName string, config *cmtypes.CiliumClusterConfig, backend kvstore.BackendOperations) error
Types ¶
type ClusterMesh ¶
type ClusterMesh struct {
// contains filtered or unexported fields
}
ClusterMesh is a cache of multiple remote clusters
func NewClusterMesh ¶
func NewClusterMesh(c Configuration) (*ClusterMesh, error)
NewClusterMesh creates a new remote cluster cache based on the provided configuration
func (*ClusterMesh) Close ¶ added in v1.5.0
func (cm *ClusterMesh) Close()
Close stops watching for remote cluster configuration files to appear and will close all connections to remote clusters
func (*ClusterMesh) ClustersSynced ¶ added in v1.7.0
func (cm *ClusterMesh) ClustersSynced(ctx context.Context) error
ClustersSynced returns after all clusters were synchronized with the bpf datapath.
func (*ClusterMesh) NumReadyClusters ¶
func (cm *ClusterMesh) NumReadyClusters() int
NumReadyClusters returns the number of remote clusters to which a connection has been established
func (*ClusterMesh) Status ¶
func (cm *ClusterMesh) Status() (status *models.ClusterMeshStatus)
Status returns the status of the ClusterMesh subsystem
type Configuration ¶
type Configuration struct { // Name is the name of the local cluster. This is used for logging and metrics Name string // NodeName is the name of the local node. This is used for logging and metrics NodeName string // ConfigDirectory is the path to the directory that will be watched for etcd // configuration files to appear ConfigDirectory string // NodeKeyCreator is the function used to create node instances as // nodes are being discovered in remote clusters NodeKeyCreator store.KeyCreator // ServiceMerger is the interface responsible to merge service and // endpoints into an existing cache ServiceMerger ServiceMerger // NodeManager is the node manager to manage all discovered remote // nodes NodeManager *nodemanager.Manager // RemoteIdentityWatcher provides identities that have been allocated on a // remote cluster. RemoteIdentityWatcher RemoteIdentityWatcher IPCache *ipcache.IPCache // contains filtered or unexported fields }
Configuration is the configuration that must be provided to NewClusterMesh()
func (*Configuration) NodeObserver ¶
func (c *Configuration) NodeObserver() store.Observer
NodeObserver returns the node store observer of the configuration
type RemoteIdentityWatcher ¶
type RemoteIdentityWatcher interface { // WatchRemoteIdentities starts watching for identities in another kvstore and // syncs all identities to the local identity cache. RemoteName should be unique // unless replacing an existing remote's backend. WatchRemoteIdentities(remoteName string, backend kvstore.BackendOperations) (*allocator.RemoteCache, error) // RemoveRemoteIdentities removes any reference to a remote identity source. RemoveRemoteIdentities(name string) // Close stops the watcher. Close() }
RemoteIdentityWatcher is any type which provides identities that have been allocated on a remote cluster.
type ServiceMerger ¶
type ServiceMerger interface { MergeExternalServiceUpdate(service *serviceStore.ClusterService, swg *lock.StoppableWaitGroup) MergeExternalServiceDelete(service *serviceStore.ClusterService, swg *lock.StoppableWaitGroup) }
ServiceMerger is the interface to be implemented by the owner of local services. The functions have to merge service updates and deletions with local services to provide a shared view.