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

Add option to create ServiceAcount API token secrets on Kubernetes 1.24+ #234

Closed simu closed 2 years ago

simu commented 2 years ago

This PR adds a new environment variable which controls whether the operator should create ServiceAccount token secrets for the ServiceAccounts created for each cluster and tenant. If the flag is enabled, we create a ServiceAccount token secret for the ServiceAccounts created for each Cluster and Tenant. We set controller references on the created secrets so that a cluster or tenant reconcile is triggered when a token secret is deleted.

The secrets are created as documented in https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/#to-create-additional-api-tokens

Closes #229

Checklist