-
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
Issue 7036: node selection for data mover backup #7437
Conversation
Signed-off-by: Lyndon-Li <[email protected]>
64595bd
to
920f88b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7437 +/- ##
==========================================
+ Coverage 61.73% 61.74% +0.01%
==========================================
Files 262 263 +1
Lines 28429 28780 +351
==========================================
+ Hits 17550 17770 +220
- Misses 9646 9763 +117
- Partials 1233 1247 +14 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Lyndon-Li <[email protected]>
920f88b
to
7bf7fb9
Compare
@@ -455,3 +485,42 @@ func (e *csiSnapshotExposer) createBackupPod(ctx context.Context, ownerObject co | |||
|
|||
return e.kubeClient.CoreV1().Pods(ownerObject.Namespace).Create(ctx, pod, metav1.CreateOptions{}) | |||
} | |||
|
|||
func toSystemAffinity(loadAffinity *nodeagent.LoadAffinity) *corev1.Affinity { |
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.
Why we cannot use the corev1.Affinity
directly rather than defining our own type?
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 think there are two questions:
- Why do we wrap
metav1.LabelSelector
/corev1.Affinity
instead of using it directly? -- We may need to add some other controllers thatmetav1.LabelSelector
/corev1.Affinity
cannot provide in future, so we add a simple wrap here. Whenever we want to change, we just append new fields so as to avoid break changes. - Why don't we use
corev1.Affinity
directly? --corev1.Affinity
is more complex than we want to provide to users, e.g., we only useRequiredDuringSchedulingIgnoredDuringExecution
, so we need to limit users input
Signed-off-by: Lyndon-Li <[email protected]>
9268dbc
to
dccde10
Compare
Fix issue #7036. Add the implementation of node selection for data mover backups