install

package
v2.4.3-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 20 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"
	ManagerAppName            = "traffic-manager"
	ManagerPortHTTP           = 8081
	MutatorWebhookPortHTTPS   = 8443
	MutatorWebhookTLSName     = "mutator-webhook-tls"
	TelAppMountPoint          = "/tel_app_mounts"
)

Variables

This section is empty.

Functions

func AgentContainer

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

func AgentVolume

func AgentVolume() corev1.Volume

func FindMatchingPort

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

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

func FindMatchingService

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

func FindMatchingServices

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

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 GetPodTemplateFromObject

func GetPodTemplateFromObject(obj kates.Object) (*kates.PodTemplateSpec, error)

func GetPort

func GetPort(cn *corev1.Container, portName string) (*corev1.ContainerPort, error)

GetPort finds a port with the given name and returns it.

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 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 ObjErrorf

func ObjErrorf(obj kates.Object, format string, args ...interface{}) error

func ToPEM

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

ToPEM returns the PEM encoding of data

Types

type AlreadyUndone added in v2.4.0

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

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

func (*AlreadyUndone) Error added in v2.4.0

func (e *AlreadyUndone) Error() string

func (*AlreadyUndone) Unwrap added in v2.4.0

func (e *AlreadyUndone) Unwrap() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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