projectsyn / lieutenant-operator

The Project Syn Inventory API Operator
https://docs.syn.tools/lieutenant-operator/
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Create ServiceAccount token secrets on Kubernetes 1.24+ #229

Closed simu closed 2 years ago

simu commented 2 years ago

Context

Kubernetes 1.24+ doesn't create service account token secrets by default anymore. However, Lieutenant expects those secrets to be present, as the token is used by the registered clusters to authenticate themselves to Lieutenant (and Vault).

We should ensure Lieutenant creates a secret as documented in https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-service-account-api-token, whenever it creates a service account.

Alternatives

Rework the cluster authentication completely.