Documentation
¶
Index ¶
- Constants
- func AgentContainer(name string, imageName string, appContainer *corev1.Container, ...) corev1.Container
- func AgentVolume() corev1.Volume
- func FindMatchingPort(cns []corev1.Container, portNameOrNumber string, svc *kates.Service) (sPort *kates.ServicePort, cn *kates.Container, cPortIndex int, err error)
- func FindMatchingService(c context.Context, client *kates.Client, ...) (*kates.Service, error)
- func FindMatchingServices(c context.Context, client *kates.Client, ...) ([]*kates.Service, error)
- func GenerateKeys(mgrNamespace string) (crtPem, keyPem, caPem []byte, err error)
- func GetPodTemplateFromObject(obj kates.Object) (*kates.PodTemplateSpec, error)
- func GetPort(cn *corev1.Container, portName string) (*corev1.ContainerPort, error)
- func HiddenPortName(name string, ordinal int) string
- func InitContainer(imageName string, port corev1.ContainerPort, appPort int) corev1.Container
- func IsAlreadyUndone(err error) bool
- func NewAlreadyUndone(err error, msg string) error
- func ObjErrorf(obj kates.Object, format string, args ...interface{}) error
- func ToPEM(file, keyType string, data []byte) ([]byte, error)
- type AlreadyUndone
Constants ¶
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" )
const AgentUID = int64(7777)
const EnvPrefix = "_TEL_AGENT_"
const InitContainerName = "tel-agent-init"
Variables ¶
This section is empty.
Functions ¶
func AgentContainer ¶
func AgentContainer( name string, imageName string, appContainer *corev1.Container, port corev1.ContainerPort, appPort int, managerNamespace string, setGID bool, ) corev1.Container
AgentContainer will return a configured traffic agent
func AgentVolume ¶
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 FindMatchingServices ¶
func GenerateKeys ¶
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 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 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