controllers

package
v0.0.0-...-4760111 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CreatedKumaDataplaneReason is added to an event when
	// a new Dataplane is successfully created.
	CreatedKumaDataplaneReason = "CreatedKumaDataplane"
	// UpdatedKumaDataplaneReason is added to an event when
	// an existing Dataplane is successfully updated.
	UpdatedKumaDataplaneReason = "UpdatedKumaDataplane"
	// FailedToGenerateKumaDataplaneReason is added to an event when
	// a Dataplane cannot be generated or is not valid.
	FailedToGenerateKumaDataplaneReason = "FailedToGenerateKumaDataplane"
)

Variables

This section is empty.

Functions

func InboundInterfacesFor

func InboundInterfacesFor(pod *kube_core.Pod, services []*kube_core.Service, isGateway bool) ([]*mesh_proto.Dataplane_Networking_Inbound, error)

func InboundTagsFor

func InboundTagsFor(pod *kube_core.Pod, svc *kube_core.Service, svcPort *kube_core.ServicePort, isGateway bool) map[string]string

func MeshFor

func MeshFor(pod *kube_core.Pod) string

func MetricsFor

func MetricsFor(pod *kube_core.Pod) (*mesh_proto.MetricsBackend, error)

func ParseServiceFQDN

func ParseServiceFQDN(host string) (name string, namespace string, err error)

func ProtocolTagFor

func ProtocolTagFor(svc *kube_core.Service, svcPort *kube_core.ServicePort) string

ProtocolTagFor infers service protocol from a `<port>.service.kuma.io/protocol` annotation.

func ServiceTagFor

func ServiceTagFor(svc *kube_core.Service, svcPort *kube_core.ServicePort) string

Types

type DataplaneToSameMeshDataplanesMapper

type DataplaneToSameMeshDataplanesMapper struct {
	kube_client.Client
	Log logr.Logger
}

func (*DataplaneToSameMeshDataplanesMapper) Map

type Endpoint

type Endpoint struct {
	Address string
	Port    uint32
}

type EndpointsByService

type EndpointsByService map[string][]Endpoint

func (EndpointsByService) Services

func (e EndpointsByService) Services() []string

type PodConverter

type PodConverter struct {
	ServiceGetter kube_client.Reader
}

func (*PodConverter) DataplaneFor

func (p *PodConverter) DataplaneFor(pod *kube_core.Pod, services []*kube_core.Service, others []*mesh_k8s.Dataplane) (*mesh_proto.Dataplane, error)

func (*PodConverter) OutboundInterfacesFor

func (p *PodConverter) OutboundInterfacesFor(pod *kube_core.Pod, others []*mesh_k8s.Dataplane) ([]*mesh_proto.Dataplane_Networking_Outbound, error)

func (*PodConverter) PodToDataplane

func (p *PodConverter) PodToDataplane(dataplane *mesh_k8s.Dataplane, pod *kube_core.Pod, services []*kube_core.Service, others []*mesh_k8s.Dataplane) error

type PodReconciler

type PodReconciler struct {
	kube_client.Client
	kube_record.EventRecorder
	Scheme       *kube_runtime.Scheme
	Log          logr.Logger
	PodConverter PodConverter
}

PodReconciler reconciles a Pod object

func (*PodReconciler) Reconcile

func (r *PodReconciler) Reconcile(req kube_ctrl.Request) (kube_ctrl.Result, error)

func (*PodReconciler) SetupWithManager

func (r *PodReconciler) SetupWithManager(mgr kube_ctrl.Manager) error

type ServiceToPodsMapper

type ServiceToPodsMapper struct {
	kube_client.Client
	Log logr.Logger
}

func (*ServiceToPodsMapper) Map

Jump to

Keyboard shortcuts

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