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

🌱 Reduce reconcilements #1359

Merged
merged 1 commit into from
Jun 24, 2024
Merged

🌱 Reduce reconcilements #1359

merged 1 commit into from
Jun 24, 2024

Conversation

janiskemper
Copy link
Contributor

What this PR does / why we need it:

  • Filter HCloudMachine events so that status updates of the resource don't trigger another reconcilement of HCloudMachine
  • Filter HetznerCluster events so that status updates of the resource don't trigger another reconcilement of HetznerCluster
  • Filter HetznerCluster events so that some status updates that are not important don't trigger reconcilement of HCloudMachine
  • Filter Machine events so that status updates of the resource don't trigger another reconcilement of HCloudMachine a
  • Filter Cluster events so that status updates of the resource don't trigger another reconcilement of HetznerCluster
  • Increase the time period to requeue if a server is starting
  • Increase the time period to requeue if a server has not status yet
  • Increase the time period to requeue if the kubeapi server is not yet reachable before adding it as target to the load balancer
  • Don't trigger multiple shutdown calls for one server and increase the timeout to requeue after a shutdown is triggered

TODOs:

  • squash commits
  • include documentation
  • add unit tests

Side note:
I will add an issue for unit testing the functions I have added after this is getting merged.

batistein
batistein previously approved these changes Jun 21, 2024
@janiskemper janiskemper marked this pull request as ready for review June 21, 2024 13:58
@syself-bot syself-bot bot added the area/code Changes made in the code directory label Jun 21, 2024
Copy link
Contributor

@apricote apricote left a comment

Choose a reason for hiding this comment

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

Two notes about the predicates, otherwise this looks good and a step in the right direction. Would love to have some better options for finding/debugging this from controller-runtime.

controllers/hcloudmachine_controller.go Show resolved Hide resolved
controllers/hcloudmachine_controller.go Show resolved Hide resolved
@janiskemper janiskemper force-pushed the reduce-reconcilements branch 2 times, most recently from cc156c7 to 0cd4ab0 Compare June 21, 2024 14:15
@syself-bot syself-bot bot added the size/L Denotes a PR that changes 200-800 lines, ignoring generated files. label Jun 21, 2024
- Filter HCloudMachine events so that status updates of the resource
  don't trigger another reconcilement of HCloudMachine
- Filter HetznerCluster events so that status updates of the resource
  don't trigger another reconcilement of HetznerCluster
- Filter HetznerCluster events so that some status updates that are not
  important don't trigger reconcilement of HCloudMachine
- Filter Machine events so that status updates of the resource don't
  trigger another reconcilement of HCloudMachine a
- Filter Cluster events so that status updates of the resource don't
  trigger another reconcilement of HetznerCluster
- Increase the time period to requeue if a server is starting
- Increase the time period to requeue if a server has not status yet
- Increase the time period to requeue if the kubeapi server is not yet
  reachable before adding it as target to the load balancer
- Don't trigger multiple shutdown calls for one server and increase the
  timeout to requeue after a shutdown is triggered
@janiskemper janiskemper merged commit 76f8b41 into main Jun 24, 2024
9 checks passed
@janiskemper janiskemper deleted the reduce-reconcilements branch June 24, 2024 08:01
@yrs147 yrs147 mentioned this pull request Jul 2, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/code Changes made in the code directory size/L Denotes a PR that changes 200-800 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants