mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-29 17:58:15 +08:00
This MR introduces Kubernetes Secret storage for Teleport Kubernetes Agent state. When running Teleport Agent inside a Kubernetes cluster where TELEPORT_REPLICA_NAME and KUBE_NAMESPACE exist, the agent will store identities and states in a Kubernetes Secret instead of local storage. Otherwise, if the above environment variables are not present or not in Kubernetes, the agent persists state in SQLite. Notes: Fresh installs will enable the Kubernetes Secret Storage by default. If PV storage is configured, the agent will store its identity in a Secret and use the PV for non-identity objects. If the operator is upgrading from an existing release that didn't support Secret storage, the Helm chart will convert the objects to enable Kube Secret Storage. If the current object is a Deployment, the Helm chart installs a new Statefulset side by side and will trigger a Helm hook that is responsible for deleting the Deployment once Statefulset pods are healthy. Otherwise, if upgrading from a Statefulset the agent will read the credentials stored in PV and move them into Kube Secret. Implementation of #12958 Related to #5585