-
Notifications
You must be signed in to change notification settings - Fork 176
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
chore: lifecycle action support target pod role selector #8438
chore: lifecycle action support target pod role selector #8438
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-0.9 #8438 +/- ##
===============================================
+ Coverage 64.70% 64.89% +0.18%
===============================================
Files 358 358
Lines 45485 45500 +15
===============================================
+ Hits 29432 29525 +93
+ Misses 13416 13342 -74
+ Partials 2637 2633 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
// this is hack for some special cases which need to run on the same node as the target pod | ||
if action.TargetPodSelector == appsv1alpha1.RoleSelector && len(action.MatchingKey) > 0 { | ||
jobObj.Spec.Template.Spec.NodeSelector = map[string]string{ | ||
"kubernetes.io/hostname": tplPod.Spec.NodeName, |
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.
use corev1.LabelHostname
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.
use
corev1.LabelHostname
done
No description provided.