controllers

package
v0.0.0-...-7b34d14 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 26 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 GatewayFor

func GatewayFor(clusterName string, pod *kube_core.Pod, services []*kube_core.Service) (*mesh_proto.Dataplane_Networking_Gateway, error)

func InboundInterfacesFor

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

func InboundTagsFor

func InboundTagsFor(zone string, 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 ParseService

func ParseService(host string) (name string, namespace string, port uint32, 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
	Zone          string
}

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) IngressFor

func (p *PodConverter) IngressFor(pod *kube_core.Pod) *mesh_proto.Dataplane

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

func (*PodConverter) PodToIngress

func (p *PodConverter) PodToIngress(dataplane *mesh_k8s.Dataplane, pod *kube_core.Pod) 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