istio: Index | Files

package serviceentry

import ""


Package Files

conversion.go servicediscovery.go

func ServiceToServiceEntry Uses

func ServiceToServiceEntry(svc *model.Service) *config.Config

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.

type ServiceDiscoveryOption Uses

type ServiceDiscoveryOption func(*ServiceEntryStore)

func DisableServiceEntryProcessing Uses

func DisableServiceEntryProcessing() ServiceDiscoveryOption

type ServiceEntryStore Uses

type ServiceEntryStore struct {
    XdsUpdater model.XDSUpdater
    // contains filtered or unexported fields

ServiceEntryStore communicates with ServiceEntry CRDs and monitors for changes

func NewServiceDiscovery Uses

func NewServiceDiscovery(
    configController model.ConfigStoreCache,
    store model.IstioConfigStore,
    xdsUpdater model.XDSUpdater,
    options ...ServiceDiscoveryOption,
) *ServiceEntryStore

NewServiceDiscovery creates a new ServiceEntry discovery service

func (*ServiceEntryStore) AppendServiceHandler Uses

func (s *ServiceEntryStore) AppendServiceHandler(_ func(*model.Service, model.Event))

AppendServiceHandler adds service resource event handler. Service Entries does not use these handlers.

func (*ServiceEntryStore) AppendWorkloadHandler Uses

func (s *ServiceEntryStore) AppendWorkloadHandler(h func(*model.WorkloadInstance, model.Event))

AppendWorkloadHandler adds instance event handler. Service Entries does not use these handlers.

func (*ServiceEntryStore) Cluster Uses

func (s *ServiceEntryStore) Cluster() string

func (*ServiceEntryStore) GetIstioServiceAccounts Uses

func (s *ServiceEntryStore) GetIstioServiceAccounts(svc *model.Service, ports []int) []string

GetIstioServiceAccounts implements model.ServiceAccounts operation For service entries using workload entries or mix of workload entries and pods, this function returns the appropriate service accounts used by these.

func (*ServiceEntryStore) GetProxyServiceInstances Uses

func (s *ServiceEntryStore) GetProxyServiceInstances(node *model.Proxy) []*model.ServiceInstance

GetProxyServiceInstances lists service instances co-located with a given proxy NOTE: The service objects in these instances do not have the auto allocated IP set.

func (*ServiceEntryStore) GetProxyWorkloadLabels Uses

func (s *ServiceEntryStore) GetProxyWorkloadLabels(proxy *model.Proxy) labels.Collection

func (*ServiceEntryStore) GetService Uses

func (s *ServiceEntryStore) GetService(hostname host.Name) (*model.Service, error)

GetService retrieves a service by host name if it exists THIS IS A LINEAR SEARCH WHICH CAUSES ALL SERVICE ENTRIES TO BE RECONVERTED - DO NOT USE NOTE: This does not auto allocate IPs. The service entry implementation is used only for tests.

func (*ServiceEntryStore) HasSynced Uses

func (s *ServiceEntryStore) HasSynced() bool

HasSynced always returns true for SE

func (*ServiceEntryStore) InstancesByPort Uses

func (s *ServiceEntryStore) InstancesByPort(svc *model.Service, port int, labels labels.Collection) []*model.ServiceInstance

InstancesByPort retrieves instances for a service on the given ports with labels that match any of the supplied labels. All instances match an empty tag list.

func (*ServiceEntryStore) NetworkGateways Uses

func (s *ServiceEntryStore) NetworkGateways() map[string][]*model.Gateway

func (*ServiceEntryStore) Provider Uses

func (s *ServiceEntryStore) Provider() serviceregistry.ProviderID

func (*ServiceEntryStore) ResyncEDS Uses

func (s *ServiceEntryStore) 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 (*ServiceEntryStore) Run Uses

func (s *ServiceEntryStore) Run(_ <-chan struct{})

Run is used by some controllers to execute background jobs after init is done.

func (*ServiceEntryStore) Services Uses

func (s *ServiceEntryStore) Services() ([]*model.Service, error)

Services list declarations of all services in the system

func (*ServiceEntryStore) WorkloadInstanceHandler Uses

func (s *ServiceEntryStore) WorkloadInstanceHandler(wi *model.WorkloadInstance, event model.Event)

WorkloadInstanceHandler defines the handler for service instances generated by other registries

Package serviceentry imports 22 packages (graph) and is imported by 9 packages. Updated 2021-01-22. Refresh now. Tools for package owners.