canonical / k8s-snap

Canonical Kubernetes is an opinionated and CNCF conformant Kubernetes operated by Snaps and Charms, which come together to bring simplified operations and an enhanced security posture on any infrastructure.
GNU General Public License v3.0
40 stars 11 forks source link

Add control-plane token expiry #620

Closed bschimke95 closed 1 month ago

bschimke95 commented 1 month ago

Microcluster v2 supports token TTL. This PR exposes this configuration option to the API/CLI.

Note that is only applicable for the control-plane tokens right now. Workers will be done in separate work (since we don't use microcluster for that it is more involved as we need to implement the logic ourselves).

This PR requires the (backward-compatible) update in the k8s-snap-api. https://github.com/canonical/k8s-snap-api/pull/5 Once this PR is reviewed and approved, I will merge the API change, create a new tag (1.0.3) and update this k8s-snap PR to use the new API version.