-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add capi-auth-token header to /dqlite/remove request #68
Add capi-auth-token header to /dqlite/remove request #68
Conversation
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.
Minor nits, LGTM in general
@@ -0,0 +1 @@ | |||
package token_test |
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.
left over?
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.
Nah thanks for pointing this out. Forgot to add the tests. Add the tests both here and in the bootstrap provider.
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.
LGTM overall, should we update len(machines) > 1
check to len(machines) > 2
since we shouldn't do this on a 2 node cluster and we are not handling this situation in the cluster agent?
Summary
This PR adds the
capi-auth-token
header to thedqlite/remove
request.The
<cluster>-capi-auth-token
secret is supposed to be created by the Microk8s bootstrap provider. This coupling is (AFAIK) inevitable because we're having them in separate repos and the bootstrap provider is responsible for populating the/capi/etc/token
file on the control plane machines.removeEndpoint
request field is changed toremove_endpoint
to comply with the recent MAAS API guidelines.PR series