Documentation ¶
Index ¶
- Constants
- func AgentContainer(name string, imageName string, appContainer *core.Container, ...) core.Container
- func AgentVolume() corev1.Volume
- func FilterServicePorts(svc *core.Service, nameOrNumber string) ([]core.ServicePort, error)
- func FindMatchingPort(cns []core.Container, portNameOrNumber string, svc *core.Service) (sPort *core.ServicePort, cn *core.Container, cPortIndex int, err error)
- func FindMatchingService(c context.Context, portNameOrNumber, svcName, namespace string, ...) (*core.Service, error)
- func FindMatchingServices(c context.Context, portNameOrNumber, svcName, namespace string, ...) ([]*core.Service, error)
- func GenerateKeys(mgrNamespace string) (crtPem, keyPem, caPem []byte, err error)
- func HiddenPortName(name string, ordinal int) string
- func InitContainer(imageName string, port core.ContainerPort, appPort int) core.Container
- func IsAlreadyUndone(err error) bool
- func NewAlreadyUndone(err error, msg string) error
- func ToPEM(file, keyType string, data []byte) ([]byte, error)
- type AlreadyUndoneError
Constants ¶
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" )
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 FilterServicePorts ¶ added in v2.6.0
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 ¶
GenerateKeys creates the crt.pem, key.pem, and ca.pem needed when setting up the mutator webhook for agent auto-injection.
func HiddenPortName ¶
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
InitContainer will return a configured init container for an agent.
func IsAlreadyUndone ¶ added in v2.4.0
IsAlreadyUndone returns whether the given error -- possibly a multierror -- indicates that all actions have been undone.
func NewAlreadyUndone ¶ added in v2.4.0
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