-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* 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 <[email protected]>
- Loading branch information
1 parent
8e6aee1
commit 072b6aa
Showing
12 changed files
with
94 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/k8s/pkg/k8sd/database/sql/migrations/worker-tokens/000-create.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE TABLE worker_tokens ( | ||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
name TEXT NOT NULL, | ||
token TEXT NOT NULL | ||
) |
4 changes: 0 additions & 4 deletions
4
src/k8s/pkg/k8sd/database/sql/queries/cluster-configs/delete-worker-token.sql
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/k8s/pkg/k8sd/database/sql/queries/cluster-configs/insert-worker-token.sql
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/k8s/pkg/k8sd/database/sql/queries/cluster-configs/select-worker-token.sql
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
src/k8s/pkg/k8sd/database/sql/queries/worker-tokens/delete-by-token.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
DELETE FROM | ||
worker_tokens AS t | ||
WHERE | ||
t.token = ? |
4 changes: 4 additions & 0 deletions
4
src/k8s/pkg/k8sd/database/sql/queries/worker-tokens/insert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
INSERT INTO | ||
worker_tokens(name, token) | ||
VALUES | ||
( ?, ? ) |
7 changes: 7 additions & 0 deletions
7
src/k8s/pkg/k8sd/database/sql/queries/worker-tokens/select.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
SELECT | ||
t.name | ||
FROM | ||
worker_tokens AS t | ||
WHERE | ||
( t.token = ? ) | ||
LIMIT 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters