-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[ws-manager-mk2] Protect tokens #16806
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
Changes from 14 commits
1fec3a5
45e7b11
23415c1
c92aa8c
e0a758e
4bb2360
7d76e43
3dc68c6
1c2bcf6
4037d81
dd74b79
8389e32
c736745
ce48eea
ef697aa
8a5d725
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -358,6 +358,11 @@ func (r *WorkspaceReconciler) deleteWorkspaceSecrets(ctx context.Context, ws *wo | |
if err != nil { | ||
log.Error(err, "could not delete environment secret", "workspace", ws.Name) | ||
} | ||
|
||
err = r.deleteSecret(ctx, fmt.Sprintf("%s-%s", ws.Name, "tokens"), r.Config.SecretsNamespace) | ||
if err != nil { | ||
log.Error(err, "could not delete token secret", "workspace", ws.Name) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. still think we should return an error when we fail to delete the secret, and not remove the finalizer if there's an error, so we try again until all secrets have been cleaned up There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We retry the deletion of the secret now and will not delete the workspace CR until the deletion of the secret suceeds. |
||
} | ||
|
||
func (r *WorkspaceReconciler) deleteSecret(ctx context.Context, name, namespace string) error { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had an out of bounds error without it.