Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose Bootstrap Token Reset Functionality in API #81

Open
tobru opened this issue Sep 9, 2020 · 0 comments
Open

Expose Bootstrap Token Reset Functionality in API #81

tobru opened this issue Sep 9, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@tobru
Copy link
Contributor

tobru commented Sep 9, 2020

Context

It happens every so often that more time passes between cluster registration in Lieutenant and the actual bootstrapping of Steward so that the bootstrap token already expired. Or the same cluster needs to be replaced again with the same cluster ID, but the bootstrap token has already been used.

Expose a functionality in the API to reset the cluster bootstrap token to be valid (again).

Manual process, directly on the Kubernetes API object:

curl -k -H "${LIEUTENANT_AUTH}" -H "Content-Type: application/json-patch+json" -X PATCH -d '[{ "op": "remove", "path": "/status/bootstrapToken" }]' "https://localhost:6443/apis/syn.tools/v1alpha1/namespaces/lieutenant/clusters/${CLUSTER_ID}/status"

It boils down to remove the field .status.bootstrapToken from the Cluster object, the bootstrap token gets recreated by the Lieutenant Operator automatically again.

Alternatives

Only document how to reset the bootstrap token, not exposing any automation for it.

@tobru tobru added the enhancement New feature or request label Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant