install

package
v2.14.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentContainerName        = "traffic-agent"
	AgentAnnotationVolumeName = "traffic-annotations"
	AgentInjectorName         = "agent-injector"
	DomainPrefix              = "telepresence.getambassador.io/"
	InjectAnnotation          = DomainPrefix + "inject-" + AgentContainerName
	ServicePortAnnotation     = DomainPrefix + "inject-service-port"
	ServiceNameAnnotation     = DomainPrefix + "inject-service-name"
	ManualInjectAnnotation    = DomainPrefix + "manually-injected"
	ManagerAppName            = "traffic-manager"
	MutatorWebhookTLSName     = "mutator-webhook-tls"
	TelAppMountPoint          = "/tel_app_mounts"
)
View Source
const (
	EnvPrefix         = "_TEL_AGENT_"
	InitContainerName = "tel-agent-init"
)

Variables

This section is empty.

Functions

func AgentContainer

func AgentContainer(
	name string,
	imageName string,
	appContainer *core.Container,
	port core.ContainerPort,
	appPort int,
	appProto string,
	apiPort int,
	managerNamespace string,
) core.Container

AgentContainer will return a configured traffic agent.

func AgentVolume

func AgentVolume() corev1.Volume

func FilterServicePorts added in v2.6.0

func FilterServicePorts(svc *core.Service, nameOrNumber string) ([]core.ServicePort, error)

FilterServicePorts iterates through a list of ports in a service and only returns the ports that match the given nameOrNumber. All ports will be returned if nameOrNumber is equal to the empty string.

func FindMatchingPort

func FindMatchingPort(cns []core.Container, portNameOrNumber string, svc *core.Service) (
	sPort *core.ServicePort,
	cn *core.Container,
	cPortIndex int,
	err error,
)

FindMatchingPort finds the matching container associated with portNameOrNumber in the given service. Deprecated.

func FindMatchingService

func FindMatchingService(c context.Context, portNameOrNumber, svcName, namespace string, labels map[string]string) (*core.Service, error)

FindMatchingService find service based on given arguments Deprecated.

func FindMatchingServices

func FindMatchingServices(c context.Context, portNameOrNumber, svcName, namespace string, labels map[string]string) ([]*core.Service, error)

FindMatchingServices find services matching the arguments Deprecated.

func GenerateKeys

func GenerateKeys(mgrNamespace string) (crtPem, keyPem, caPem []byte, err error)

GenerateKeys creates the crt.pem, key.pem, and ca.pem needed when setting up the mutator webhook for agent auto-injection.

func HiddenPortName

func HiddenPortName(name string, ordinal int) string

HiddenPortName prefixes the given name with "tm-" and truncates it to 15 characters. If the ordinal is greater than zero, the last two digits are reserved for the hexadecimal representation of that ordinal.

func InitContainer added in v2.4.4

func InitContainer(imageName string, port core.ContainerPort, appPort int) core.Container

InitContainer will return a configured init container for an agent.

func IsAlreadyUndone added in v2.4.0

func IsAlreadyUndone(err error) bool

IsAlreadyUndone returns whether the given error -- possibly a multierror -- indicates that all actions have been undone.

func NewAlreadyUndone added in v2.4.0

func NewAlreadyUndone(err error, msg string) error

func ToPEM

func ToPEM(file, keyType string, data []byte) ([]byte, error)

ToPEM returns the PEM encoding of data.

Types

type AlreadyUndoneError added in v2.8.0

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

AlreadyUndoneError means that an install action has already been undone, perhaps by manual user action.

func (*AlreadyUndoneError) Error added in v2.8.0

func (e *AlreadyUndoneError) Error() string

func (*AlreadyUndoneError) Unwrap added in v2.8.0

func (e *AlreadyUndoneError) Unwrap() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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