Documentation ¶
Index ¶
- func ConvertClientWorkloadEntry(cfg *clientnetworking.WorkloadEntry) *clientnetworking.WorkloadEntry
- func ConvertWorkloadEntry(cfg config.Config) *networking.WorkloadEntry
- func ServiceToServiceEntry(svc *model.Service, proxy *model.Proxy) *config.Config
- type Controller
- func (s *Controller) AppendServiceHandler(_ model.ServiceHandler)
- func (s *Controller) AppendWorkloadHandler(h func(*model.WorkloadInstance, model.Event))
- func (s *Controller) Cluster() cluster.ID
- func (s *Controller) GetProxyServiceTargets(node *model.Proxy) []model.ServiceTarget
- func (s *Controller) GetProxyWorkloadLabels(proxy *model.Proxy) labels.Instance
- func (s *Controller) GetService(hostname host.Name) *model.Service
- func (s *Controller) HasSynced() bool
- func (s *Controller) MCSServices() []model.MCSServiceInfo
- func (s *Controller) NamespaceDiscoveryHandler(namespace string, event model.Event)
- func (s *Controller) NetworkGateways() []model.NetworkGateway
- func (s *Controller) NotifyWorkloadInstanceHandlers(wi *model.WorkloadInstance, event model.Event)
- func (s *Controller) Provider() provider.ID
- func (s *Controller) ResyncEDS()
- func (s *Controller) Run(stopCh <-chan struct{})
- func (s *Controller) Services() []*model.Service
- func (s *Controller) WorkloadInstanceHandler(wi *model.WorkloadInstance, event model.Event)
- type HostAddress
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertClientWorkloadEntry ¶
func ConvertClientWorkloadEntry(cfg *clientnetworking.WorkloadEntry) *clientnetworking.WorkloadEntry
ConvertClientWorkloadEntry merges the metadata.labels and spec.labels
func ConvertWorkloadEntry ¶
func ConvertWorkloadEntry(cfg config.Config) *networking.WorkloadEntry
ConvertWorkloadEntry convert wle from Config.Spec and populate the metadata labels into it.
func ServiceToServiceEntry ¶
ServiceToServiceEntry converts from internal Service representation to ServiceEntry This does not include endpoints - they'll be represented as EndpointSlice or EDS.
See convertServices() for the reverse conversion, used by Istio to handle ServiceEntry configs. See kube.ConvertService for the conversion from K8S to internal Service.
Types ¶
type Controller ¶
type Controller struct { XdsUpdater model.XDSUpdater model.NoopAmbientIndexes model.NetworkGatewaysHandler // contains filtered or unexported fields }
Controller communicates with ServiceEntry CRDs and monitors for changes.
func NewController ¶
func NewController(configController model.ConfigStoreController, xdsUpdater model.XDSUpdater, meshConfig mesh.Watcher, options ...Option, ) *Controller
NewController creates a new ServiceEntry discovery service.
func NewWorkloadEntryController ¶
func NewWorkloadEntryController(configController model.ConfigStoreController, xdsUpdater model.XDSUpdater, meshConfig mesh.Watcher, options ...Option, ) *Controller
NewWorkloadEntryController creates a new WorkloadEntry discovery service.
func (*Controller) AppendServiceHandler ¶
func (s *Controller) AppendServiceHandler(_ model.ServiceHandler)
AppendServiceHandler adds service resource event handler. Service Entries does not use these handlers.
func (*Controller) AppendWorkloadHandler ¶
func (s *Controller) AppendWorkloadHandler(h func(*model.WorkloadInstance, model.Event))
AppendWorkloadHandler adds instance event handler. Service Entries does not use these handlers.
func (*Controller) Cluster ¶
func (s *Controller) Cluster() cluster.ID
func (*Controller) GetProxyServiceTargets ¶
func (s *Controller) GetProxyServiceTargets(node *model.Proxy) []model.ServiceTarget
GetProxyServiceTargets lists service targets co-located with a given proxy NOTE: The service objects in these instances do not have the auto allocated IP set.
func (*Controller) GetProxyWorkloadLabels ¶
func (s *Controller) GetProxyWorkloadLabels(proxy *model.Proxy) labels.Instance
func (*Controller) GetService ¶
func (s *Controller) GetService(hostname host.Name) *model.Service
GetService retrieves a service by host name if it exists. NOTE: The service entry implementation is used only for tests.
func (*Controller) HasSynced ¶
func (s *Controller) HasSynced() bool
HasSynced always returns true for SE
func (*Controller) MCSServices ¶
func (s *Controller) MCSServices() []model.MCSServiceInfo
func (*Controller) NamespaceDiscoveryHandler ¶
func (s *Controller) NamespaceDiscoveryHandler(namespace string, event model.Event)
NamespaceDiscoveryHandler is to handle namespace selected or deselected because of discoverySelectors change, rather than namespace add/update/delete event triggered from namespace informer.
func (*Controller) NetworkGateways ¶
func (s *Controller) NetworkGateways() []model.NetworkGateway
func (*Controller) NotifyWorkloadInstanceHandlers ¶
func (s *Controller) NotifyWorkloadInstanceHandlers(wi *model.WorkloadInstance, event model.Event)
func (*Controller) Provider ¶
func (s *Controller) Provider() provider.ID
func (*Controller) ResyncEDS ¶
func (s *Controller) ResyncEDS()
ResyncEDS will do a full EDS update. This is needed for some tests where we have many configs loaded without calling the config handlers. This should probably not be used in production code.
func (*Controller) Run ¶
func (s *Controller) Run(stopCh <-chan struct{})
Run is used by some controllers to execute background jobs after init is done.
func (*Controller) Services ¶
func (s *Controller) Services() []*model.Service
Services list declarations of all services in the system
func (*Controller) WorkloadInstanceHandler ¶
func (s *Controller) WorkloadInstanceHandler(wi *model.WorkloadInstance, event model.Event)
WorkloadInstanceHandler defines the handler for service instances generated by other registries
type HostAddress ¶
type HostAddress struct {
// contains filtered or unexported fields
}