Expand description
Labels and annotations that let the teleport-kube-agent already
deployed in every cluster discover the environmentd Service and
register it as a Teleport app, via Kubernetes annotation-based
auto-discovery.
This is Phase 1 of moving environmentd Teleport registration off of
environment-controllerβs tctl-based flow. It registers the app
only; the db stays on environment-controller until Phase 2 installs
the Teleport Kubernetes Operator.
StructsΒ§
- Rewrite π
- Rewrite
Header π - Teleport
Config - The settings that the
--teleport-*flags provide.
ConstantsΒ§
- TELEPORT_
APP_ πDESCRIPTION - TELEPORT_
APP_ πPORT - The named environmentd Service port to register.
- TELEPORT_
APP_ πPROTOCOL - The internal HTTP endpoint is plain HTTP, not HTTPS. Set explicitly rather than relying on Teleportβs port-name heuristic to guess it.
- TELEPORT_
REWRITE_ πHEADER_ NAME - Forces the support database user on internal HTTP requests reaching the registered app. This is a security control, not a convenience: it is what stops a support session from picking a different database role.
- TELEPORT_
REWRITE_ πHEADER_ VALUE
FunctionsΒ§
- apply_
teleport_ πregistration - Adds the Teleport discovery labels and annotations to
servicewhen--enable-teleport-registrationis set. A no-op otherwise, which is the rollback path: without the flag, this function changes nothing about the Service. - dns1035_
label_ πerror - Why
nameis not a valid DNS-1035 label, orNonewhen it is one. - ordinal π
- The trailing ordinal of a Materialize resource name, named
environment-{org_uuid}-{ordinal}. - teleport_
app_ πname - The Teleport
appresource name:mz-{cloud_provider}-{region}-{base32(org_uuid)}-{ordinal}.