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

Add option to deregister node before draining. #231

Merged
merged 1 commit into from
Aug 16, 2022

Conversation

somnusfish
Copy link
Contributor

Issue number:
#156

Description of changes:

  • Add DEREGISTER_FROM_LB_WAIT_TIME_IN_SEC in .env as environment variable.
  • Deregister node from load balancer before draining
    when DEREGISTER_FROM_LB_WAIT_TIME_IN_SEC is larger than 0.
  • Register node to load balancer after draining
    when DEREGISTER_FROM_LB_WAIT_TIME_IN_SEC is larger than 0.

Testing done:
Tested on cluster, monitored node get labeled and unlabeled.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

models/src/node/client.rs Outdated Show resolved Hide resolved
agent/src/agentclient.rs Outdated Show resolved Hide resolved
agent/src/agentclient.rs Outdated Show resolved Hide resolved
@somnusfish somnusfish force-pushed the deregister branch 4 times, most recently from d8f5148 to a9d074f Compare August 11, 2022 18:44
@somnusfish somnusfish requested a review from cbgbt August 11, 2022 18:46
@somnusfish
Copy link
Contributor Author

Address the comments with name change and updated readme.md.

README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated
Comment on lines 38 to 39
To enable this feature, go to `.env`, change `EXCLUDE_FROM_LB_WAIT_TIME_IN_SEC` to a positive integer value,
run `cargo build` to regenerate `bottlerocket-update-operator.yaml` and follow the normal installation guideline.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think instead of directing folks to rebuild the project, we should have folks modify the .yaml document describing the pod deployment to modify the environment variable.

When we begin delivering this as a Helm chart, we can make that variable configurable via Helm.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated readme using .yaml for user. I would like to have a separate PR to update the development part.

* Exclude node from load balancer before draining
  when EXCLUDE_FROM_LB_WAIT_TIME_IN_SEC is larger than 0.
* Remove node exclusion from load balancer after draining
  when EXCLUDE_FROM_LB_WAIT_TIME_IN_SEC is larger than 0.
@somnusfish somnusfish merged commit 9334471 into bottlerocket-os:develop Aug 16, 2022
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.

3 participants