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

chore: lifecycle action support target pod role selector #8438

Merged

Conversation

Y-Rookie
Copy link
Collaborator

No description provided.

@github-actions github-actions bot added the size/S Denotes a PR that changes 10-29 lines. label Nov 11, 2024
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 31.57895% with 13 lines in your changes missing coverage. Please review.

Project coverage is 64.89%. Comparing base (cc6c82d) to head (a20c198).
Report is 1 commits behind head on release-0.9.

Files with missing lines Patch % Lines
...ller/component/component_lifecycle_action_utils.go 31.57% 10 Missing and 3 partials ⚠️
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     
Flag Coverage Δ
unittests 64.89% <31.57%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

// 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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use corev1.LabelHostname

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use corev1.LabelHostname

done

@apecloud-bot apecloud-bot added the approved PR Approved Test label Nov 11, 2024
@Y-Rookie Y-Rookie merged commit fe8eee3 into release-0.9 Nov 11, 2024
39 checks passed
@Y-Rookie Y-Rookie deleted the support/lifecycle-action-support-targetpod-selector branch November 11, 2024 08:35
@github-actions github-actions bot added this to the Release 0.9.2 milestone Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved PR Approved Test size/S Denotes a PR that changes 10-29 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants