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

reconciler, cron: allow overriding the reconciler cron expression #397

Closed

Conversation

maiqueb
Copy link
Collaborator

@maiqueb maiqueb commented Dec 19, 2023

What this PR does / why we need it:
Provide a config map to override the value of the cron expression. To force reloading this new value, the user should kill the pods in the whereabouts daemonset - the new pods will load the updated value.

The value of the config map is passed to the whereabouts containers as an environment variable.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer (optional):

Provide a config map to override the value of the cron expression.
To force reloading this new value, the user should kill the pods in the
whereabouts daemonset - the new pods will load the updated value.

Signed-off-by: Miguel Duarte Barroso <[email protected]>
@maiqueb maiqueb requested a review from dougbtv as a code owner December 19, 2023 14:20
@maiqueb
Copy link
Collaborator Author

maiqueb commented Dec 19, 2023

Tested locally; one can see in the whereabouts pods:

kubectl exec -it -nkube-system whereabouts-thcs9 -- env | grep RECONCILER_CRON
WHEREABOUTS_RECONCILER_CRON=0-59/2 * * * *

And checking the logs we can see that every two minutes the reconciler cron is triggered:

kubectl logs -nkube-system whereabouts-thcs9 
Done configuring CNI.  Sleep=false
2023-12-19T14:13:16Z [debug] Filtering pods with filter key 'spec.nodeName' and filter value 'whereabouts-worker3'
2023-12-19T14:13:16Z [verbose] pod controller created
2023-12-19T14:13:16Z [verbose] Starting informer factories ...
2023-12-19T14:13:16Z [verbose] Informer factories started
2023-12-19T14:13:16Z [verbose] starting network controller
2023-12-19T14:14:00Z [verbose] starting reconciler run
2023-12-19T14:14:00Z [debug] NewReconcileLooper - inferred connection data
2023-12-19T14:14:00Z [debug] listing IP pools
2023-12-19T14:14:00Z [debug] no IP addresses to cleanup
2023-12-19T14:14:00Z [verbose] reconciler success
2023-12-19T14:16:00Z [verbose] starting reconciler run
2023-12-19T14:16:00Z [debug] NewReconcileLooper - inferred connection data
2023-12-19T14:16:00Z [debug] listing IP pools
2023-12-19T14:16:00Z [debug] no IP addresses to cleanup
2023-12-19T14:16:00Z [verbose] reconciler success
2023-12-19T14:18:00Z [verbose] starting reconciler run
2023-12-19T14:18:00Z [debug] NewReconcileLooper - inferred connection data
2023-12-19T14:18:00Z [debug] listing IP pools
2023-12-19T14:18:00Z [debug] no IP addresses to cleanup
2023-12-19T14:18:00Z [verbose] reconciler success
2023-12-19T14:20:00Z [verbose] starting reconciler run
2023-12-19T14:20:00Z [debug] NewReconcileLooper - inferred connection data
2023-12-19T14:20:00Z [debug] listing IP pools
2023-12-19T14:20:00Z [debug] no IP addresses to cleanup
2023-12-19T14:20:00Z [verbose] reconciler success
2023-12-19T14:22:00Z [verbose] starting reconciler run
2023-12-19T14:22:00Z [debug] NewReconcileLooper - inferred connection data
2023-12-19T14:22:00Z [debug] listing IP pools
2023-12-19T14:22:00Z [debug] no IP addresses to cleanup
2023-12-19T14:22:00Z [verbose] reconciler success

@maiqueb
Copy link
Collaborator Author

maiqueb commented Jan 8, 2024

Closed in lieu of #398

@maiqueb maiqueb closed this Jan 8, 2024
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.

1 participant