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

Make k8s get-join-token $hostname optional #452

Merged
merged 3 commits into from
May 31, 2024
Merged

Conversation

neoaggelos
Copy link
Contributor

Summary

Allow k8s get-join-token to return tokens without specifying a hostname (and match any name specified during k8s join-cluster)

Changes

  • Add a separate worker_tokens database table
  • database.CheckWorkerNodeToken() checks against the token itself, not the node name
  • When a token has an empty node name, any joining name is accepted

@neoaggelos neoaggelos requested a review from a team as a code owner May 30, 2024 17:18
Copy link
Contributor

@louiseschmidtgen louiseschmidtgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please add a little explanation to my one question.

@neoaggelos neoaggelos merged commit 4090947 into main May 31, 2024
14 of 15 checks passed
@neoaggelos neoaggelos deleted the worker-token-names branch May 31, 2024 15:02
neoaggelos added a commit that referenced this pull request Jun 3, 2024
* Use separate table in database for worker tokens

* allow worker tokens with empty name to always match

* make k8s get-join-token hostname optional
bschimke95 added a commit that referenced this pull request Jun 3, 2024
* Use separate table in database for worker tokens

* allow worker tokens with empty name to always match

* make k8s get-join-token hostname optional

Co-authored-by: Benjamin Schimke <benjamin.schimke@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants