Skip to content

Conversation

@zhiying-lin
Copy link
Collaborator

Description of your changes

Fixes #

I have:

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

Special notes for your reviewer

@zhiying-lin zhiying-lin marked this pull request as draft October 31, 2025 09:56
@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

// When there are multiple elements, the lists of clusters corresponding to each
// placementAffinityTerm are intersected, i.e. all terms must be satisfied.
// +kubebuilder:validation:Optional
RequiredDuringSchedulingIgnoredDuringExecution []PlacementAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

what happens when the related placement changed its schedule policy, say from picking "env:staging" to "env:prod"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

// If the affinity requirements specified by this field cease to be met
// at some point during placement execution (e.g. due to a placement label update), the
// system won't evict the placement from its cluster.

It will be ignored during execution.

We expect the customers to manage the dependencies during execution. more details could be found in my draft.

// +kubebuilder:validation:Enum=Cluster;Namespaced
// It defaults to the same scope of the current placement.
// +kubebuilder:validation:Optional
AffinityScope ResourceScope `json:"affinityScope,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

can it be both?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you mean, affinity with CRP and RP? it could be, the PlacementAffinityTerm is an array.

line 287

// When there are multiple elements, the lists of clusters corresponding to each
// placementAffinityTerm are intersected, i.e. all terms must be satisfied.

@zhiying-lin zhiying-lin closed this Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants