Skip to content

Expose Bootstrap Token Reset Functionality in API #81

@tobru

Description

@tobru

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions