topology

package
v0.0.0-...-7949e55 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveServicePort

func ResolveServicePort(svcPort corev1.ServicePort, containerPorts []corev1.ContainerPort) (int32, bool)

ResolveServicePort resolves the given service port against the given container port list, as described in the Kubernetes documentation, and returns true if it has been successfully resolved, false otherwise.

The Kubernetes documentation says: Port definitions in Pods have names, and you can reference these names in the targetPort attribute of a Service. This works even if there is a mixture of Pods in the Service using a single configured name, with the same network protocol available via different port numbers.

Types

type Build

type Build interface {
	Build(ctx context.Context, filter *k8s.ResourceFilter) (*Topology, error)
}

func NewBuild

func NewBuild(c client.Client, log logr.Logger) Build

type Key

type Key = v1.Key

type Pod

type Pod = v1.Pod

type Service

type Service = v1.Service

type ServiceTrafficTarget

type ServiceTrafficTarget = v1.ServiceTrafficTarget

type ServiceTrafficTargetDestination

type ServiceTrafficTargetDestination = v1.ServiceTrafficTargetDestination

type ServiceTrafficTargetKey

type ServiceTrafficTargetKey = v1.ServiceTrafficTargetKey

type ServiceTrafficTargetSource

type ServiceTrafficTargetSource = v1.ServiceTrafficTargetSource

type Topology

type Topology struct {
	Services              map[Key]*Service                                  `json:"services"`
	Pods                  map[Key]*Pod                                      `json:"pods"`
	ServiceTrafficTargets map[ServiceTrafficTargetKey]*ServiceTrafficTarget `json:"serviceTrafficTargets"`
	TrafficSplits         map[Key]*TrafficSplit                             `json:"trafficSplits"`
}

func NewTopology

func NewTopology() *Topology

func (*Topology) Spec

func (t *Topology) Spec() *TopologySpec

type TopologySpec

type TopologySpec = v1.TopologySpec

type TrafficSpec

type TrafficSpec = v1.TrafficSpec

type TrafficSplit

type TrafficSplit = v1.TrafficSplit

type TrafficSplitBackend

type TrafficSplitBackend = v1.TrafficSplitBackend

Jump to

Keyboard shortcuts

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