Documentation
¶
Index ¶
- type Endpoints
- type NSLazyStatus
- type Namespace
- func (ns *Namespace) AddSidecar(sidecarName string)
- func (ns *Namespace) Delete(clusterName string)
- func (ns *Namespace) DeleteSidecar(sidecarName string)
- func (ns *Namespace) ID() string
- func (ns *Namespace) LazyEnabled(clusterName string) bool
- func (ns *Namespace) Update(clusterName string, namespace *corev1.Namespace)
- type Service
- func (svc *Service) DeleteFromCluster(clusterName string)
- func (svc *Service) DomainListOfPort(num, sourceNS string) []string
- func (svc *Service) FinishReconcileLazy()
- func (svc *Service) FinishReconcileService()
- func (svc *Service) ID() string
- func (svc *Service) NeedReconcileLazy() bool
- func (svc *Service) NeedReconcileService() bool
- func (svc *Service) UpdateClusterService(clusterName string, service *corev1.Service)
- func (svc *Service) UpdateNSLazy(status NSLazyStatus)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoints ¶
Endpoints contains the k8s endpoints info which lazyxds just need
func NewEndpoints ¶
NewEndpoints creates new Endpoints from k8s endpoints
type NSLazyStatus ¶
type NSLazyStatus int
NSLazyStatus represents the status of lazy xds
const ( // NSLazyStatusNone ... NSLazyStatusNone NSLazyStatus = 0 // NSLazyStatusEnabled ... NSLazyStatusEnabled NSLazyStatus = 1 // NSLazyStatusDisabled ... NSLazyStatusDisabled NSLazyStatus = 2 )
type Namespace ¶
type Namespace struct { Name string Distribution map[string]bool UserSidecar map[string]struct{} Labels map[string]string LazyStatus NSLazyStatus }
Namespace represent the namespace which contains multi-cluster info
func NewNamespace ¶
NewNamespace creates new Namespace struct from kubernetes namespace
func (*Namespace) AddSidecar ¶
AddSidecar record user-created sidecar crd
func (*Namespace) DeleteSidecar ¶
DeleteSidecar delete use-created sidecar crd
func (*Namespace) LazyEnabled ¶
LazyEnabled check if the namespace enable lazyxds Currently, if there is any user created sidecar CRD, the lazyxds will be disabled
type Service ¶
type Service struct { Name string Namespace string Distribution map[string]*clusterServiceStatus EgressService map[string]struct{} // http service which reported from als NSLazy NSLazyStatus Spec serviceStatus // desired status Status serviceStatus // contains filtered or unexported fields }
Service represent one service cross multi-cluster
func (*Service) DeleteFromCluster ¶
DeleteFromCluster delete the service of one cluster
func (*Service) DomainListOfPort ¶
DomainListOfPort return the whole list of domains related with this port
func (*Service) FinishReconcileLazy ¶
func (svc *Service) FinishReconcileLazy()
FinishReconcileLazy update lazy status using spec info
func (*Service) FinishReconcileService ¶
func (svc *Service) FinishReconcileService()
FinishReconcileService update status using spec info
func (*Service) NeedReconcileLazy ¶
NeedReconcileLazy check if lazy info is equal in status and spec
func (*Service) NeedReconcileService ¶
NeedReconcileService check if service need reconcile
func (*Service) UpdateClusterService ¶
UpdateClusterService update the service of one cluster
func (*Service) UpdateNSLazy ¶
func (svc *Service) UpdateNSLazy(status NSLazyStatus)
UpdateNSLazy update the enabled status of the namespace If the ns lazy status changed, we need update service spec