-
Notifications
You must be signed in to change notification settings - Fork 959
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
use annotation for exposed affinity for dataflow #4277
use annotation for exposed affinity for dataflow #4277
Conversation
@xliuqq @cheyang Is it possible to store affinity information in |
pkg/controllers/v1alpha1/fluidapp/dataflowaffinity/dataflowaffinity_controller.go
Outdated
Show resolved
Hide resolved
@@ -155,47 +154,28 @@ func (f *DataOpJobReconciler) injectPodNodeLabelsToJob(job *batchv1.Job) error { | |||
} | |||
|
|||
// customized labels | |||
if pod.Spec.Affinity != nil && pod.Spec.Affinity.NodeAffinity != nil { | |||
fillCustomizedNodeAffinity(pod.Spec.Affinity.NodeAffinity, injectLabels, node) | |||
exposedLabels := pod.Annotations[common.AnnotationDataFlowAffinityLabelsName] |
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 we should clearly comment here what does "exposed" mean for better code readabiility
do you mean only store the affinity information in |
Yes. All the affinity info DataFlow needs can be injected to annotations. |
I also think annotation is better than labels. Thanks. |
@xliuqq Could you please fix the conflict of source file? Thanks. |
4e48302
to
1e9cd92
Compare
/test fluid-e2e |
…b's annotation Signed-off-by: xliuqq <[email protected]>
1e9cd92
to
e6dac92
Compare
Quality Gate passedIssues Measures |
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.
/lgtm
/approve
/test fluid-e2e |
fluid-e2e failed because the port allocator randomly picked the same port for two runtimes. It's a temporary failure |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cheyang, TrafalgarZZZ The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Ⅰ. Describe what this PR does
user should define annotation for exposed dataflow affinity. see the usage in the doc.
Ⅱ. Does this pull request fix one issue?
fixes #XXXX
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews