istio: Index | Files

package aggregate

import ""


Package Files


type Controller Uses

type Controller struct {
    // contains filtered or unexported fields

Controller aggregates data across different registries and monitors for changes

func NewController Uses

func NewController(opt Options) *Controller

NewController creates a new Aggregate controller

func (*Controller) AddRegistry Uses

func (c *Controller) AddRegistry(registry serviceregistry.Instance)

AddRegistry adds registries into the aggregated controller

func (*Controller) AppendServiceHandler Uses

func (c *Controller) AppendServiceHandler(f func(*model.Service, model.Event))

AppendServiceHandler implements a service catalog operation

func (*Controller) AppendWorkloadHandler Uses

func (c *Controller) AppendWorkloadHandler(f func(*model.WorkloadInstance, model.Event))

func (*Controller) DeleteRegistry Uses

func (c *Controller) DeleteRegistry(clusterID string, providerID serviceregistry.ProviderID)

DeleteRegistry deletes specified registry from the aggregated controller

func (*Controller) GetIstioServiceAccounts Uses

func (c *Controller) GetIstioServiceAccounts(svc *model.Service, ports []int) []string

GetIstioServiceAccounts implements model.ServiceAccounts operation. The returned list contains all SPIFFE based identities that backs the service. This method also expand the results from different registries based on the mesh config trust domain aliases. To retain such trust domain expansion behavior, the xDS server implementation should wrap any (even if single) service registry by this aggreated one. For example, - { "spiffe://cluster.local/"}; when annotation is used on corresponding workloads. - { "spiffe://cluster.local/ns/default/sa/foo" }; normal kubernetes cases - { "spiffe://cluster.local/ns/default/sa/foo", "spiffe://trust-domain-alias/ns/default/sa/foo" };

if the trust domain alias is configured.

func (*Controller) GetProxyServiceInstances Uses

func (c *Controller) GetProxyServiceInstances(node *model.Proxy) []*model.ServiceInstance

GetProxyServiceInstances lists service instances co-located with a given proxy

func (*Controller) GetProxyWorkloadLabels Uses

func (c *Controller) GetProxyWorkloadLabels(proxy *model.Proxy) labels.Collection

func (*Controller) GetRegistries Uses

func (c *Controller) GetRegistries() []serviceregistry.Instance

GetRegistries returns a copy of all registries

func (*Controller) GetRegistryIndex Uses

func (c *Controller) GetRegistryIndex(clusterID string, provider serviceregistry.ProviderID) (int, bool)

GetRegistryIndex returns the index of a registry

func (*Controller) GetService Uses

func (c *Controller) GetService(hostname host.Name) (*model.Service, error)

GetService retrieves a service by hostname if exists

func (*Controller) HasSynced Uses

func (c *Controller) HasSynced() bool

HasSynced returns true when all registries have synced

func (*Controller) InstancesByPort Uses

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

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

func (*Controller) NetworkGateways Uses

func (c *Controller) NetworkGateways() map[string][]*model.Gateway

NetworkGateways merges the service-based cross-network gateways from each registry.

func (*Controller) Run Uses

func (c *Controller) Run(stop <-chan struct{})

Run starts all the controllers

func (*Controller) Running Uses

func (c *Controller) Running() bool

Running returns true after Run has been called. If already running, registries passed to AddRegistry should be started outside of this aggregate controller.

func (*Controller) Services Uses

func (c *Controller) Services() ([]*model.Service, error)

Services lists services from all platforms

type Options Uses

type Options struct {
    MeshHolder mesh.Holder

Package aggregate imports 10 packages (graph) and is imported by 8 packages. Updated 2021-01-15. Refresh now. Tools for package owners.