smi

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheCollection

type CacheCollection struct {
	Services      cache.Store
	TrafficSplit  cache.Store
	TrafficSpec   cache.Store
	TrafficTarget cache.Store
	Backpressure  cache.Store
}

CacheCollection is a struct of the Kubernetes caches used in OSM

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a struct for all components necessary to connect to and maintain state of a Kubernetes cluster.

func (*Client) GetAnnouncementsChannel

func (c *Client) GetAnnouncementsChannel() <-chan interface{}

GetAnnouncementsChannel returns the announcement channel for the SMI client.

func (*Client) GetID

func (c *Client) GetID() string

GetID returns a string descriptor / identifier of the compute provider. Required by interface: EndpointsProvider

func (*Client) GetService

func (c *Client) GetService(svc service.Name) (service *corev1.Service, exists bool, err error)

GetService retrieves the Kubernetes Services resource for the given ServiceName.

func (*Client) ListBackpressures

func (c *Client) ListBackpressures() []*backpressure.Backpressure

ListBackpressures implements smi.MeshSpec and returns a list of backpressure policies.

func (*Client) ListHTTPTrafficSpecs

func (c *Client) ListHTTPTrafficSpecs() []*spec.HTTPRouteGroup

ListHTTPTrafficSpecs implements mesh.Topology by returning the list of traffic specs.

func (*Client) ListServiceAccounts

func (c *Client) ListServiceAccounts() []service.NamespacedServiceAccount

ListServiceAccounts implements mesh.MeshSpec by returning the service accounts observed from the given compute provider

func (Client) ListServices

func (c Client) ListServices() ([]*corev1.Service, error)

ListServices returns a list of services that are part of monitored namespaces

func (*Client) ListTrafficSplitServices

func (c *Client) ListTrafficSplitServices() []service.WeightedService

ListTrafficSplitServices implements mesh.MeshSpec by returning the services observed from the given compute provider

func (*Client) ListTrafficSplits

func (c *Client) ListTrafficSplits() []*split.TrafficSplit

ListTrafficSplits implements mesh.MeshSpec by returning the list of traffic splits.

func (*Client) ListTrafficTargets

func (c *Client) ListTrafficTargets() []*target.TrafficTarget

ListTrafficTargets implements mesh.Topology by returning the list of traffic targets.

type ClientIdentity

type ClientIdentity string

ClientIdentity is the identity of an Envoy proxy connected to the Open Service Mesh.

type InformerCollection

type InformerCollection struct {
	Services      cache.SharedIndexInformer
	TrafficSplit  cache.SharedIndexInformer
	TrafficSpec   cache.SharedIndexInformer
	TrafficTarget cache.SharedIndexInformer
	Backpressure  cache.SharedIndexInformer
}

InformerCollection is a struct of the Kubernetes informers used in OSM

type MeshSpec

type MeshSpec interface {
	// ListTrafficSplits lists TrafficSplit SMI resources.
	ListTrafficSplits() []*split.TrafficSplit

	// ListTrafficSplitServices fetches all services declared with SMI Spec.
	ListTrafficSplitServices() []service.WeightedService

	// ListServiceAccounts fetches all service accounts declared with SMI Spec.
	ListServiceAccounts() []service.NamespacedServiceAccount

	// GetService fetches a specific service declared in SMI.
	GetService(service.Name) (service *corev1.Service, exists bool, err error)

	// ListHTTPTrafficSpecs lists TrafficSpec SMI resources.
	ListHTTPTrafficSpecs() []*spec.HTTPRouteGroup

	// ListTrafficTargets lists TrafficTarget SMI resources.
	ListTrafficTargets() []*target.TrafficTarget

	// ListBackpressures lists Backpressure CRD resources.
	// This is an experimental feature, which will eventually
	// in some shape or form make its way into SMI Spec.
	ListBackpressures() []*backpressure.Backpressure

	// GetAnnouncementsChannel returns the channel on which SMI makes announcements
	GetAnnouncementsChannel() <-chan interface{}

	// ListServices returns a list of services that are part of monitored namespaces
	ListServices() ([]*corev1.Service, error)
}

MeshSpec is an interface declaring functions, which provide the specs for a service mesh declared with SMI.

func NewFakeMeshSpecClient

func NewFakeMeshSpecClient() MeshSpec

NewFakeMeshSpecClient creates a fake Mesh Spec used for testing.

func NewMeshSpecClient

func NewMeshSpecClient(smiKubeConfig *rest.Config, kubeClient kubernetes.Interface, osmNamespace string, namespaceController namespace.Controller, stop chan struct{}) MeshSpec

NewMeshSpecClient implements mesh.MeshSpec and creates the Kubernetes client, which retrieves SMI specific CRDs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL