-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fs-backup for clusters with windows nodes #8518
fs-backup for clusters with windows nodes #8518
Conversation
54dbb7f
to
96cd224
Compare
2e3e3f0
to
33efb69
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8518 +/- ##
=======================================
Coverage 59.16% 59.17%
=======================================
Files 369 370 +1
Lines 39413 39487 +74
=======================================
+ Hits 23319 23366 +47
- Misses 14624 14647 +23
- Partials 1470 1474 +4 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Lyndon-Li <[email protected]>
33efb69
to
a711b10
Compare
Signed-off-by: Lyndon-Li <[email protected]>
} | ||
} | ||
|
||
if kube.WithWindowsNode(s.ctx, s.crClient, s.logger) { |
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.
Do we need to check this if the Windows node agent isn't enabled?
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.
We don't need to do this.
This is a sanity check and needs to state the fact in all cases when Windows/linux nodes exist but fs-backup/data mover won't work in the nodes.
Signed-off-by: Lyndon-Li <[email protected]>
} | ||
} | ||
|
||
if !allNodeLabeled { |
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.
The variable allNodeLabeled
is useless.
If the expected OS is found, the code returns directly inside the for loop.
We can log the warning message directly just before the last return false
.
This is tiny, feel free to change it or not.
Approved.
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.
When return false
is reached, there are two possibilities: 1. all nodes are with OS label, but are not with the expected OS type value; 2. not all nodes with OS label. So it's better to use allNodeLabeled
to track these two cases.
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.
I would retitle PR to disabling fs-backup for Non-Linux Nodes.
Changed it to |
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.
title lgtm
Make fs-backup work on linux nodes with the new Velero deployment and disable fs-backup if the source/target pod is running in non-linux node (#8424)