Skip to content

Add PodMutation custom resource example#501

Merged
vbaltrusaitis-castai merged 3 commits intomasterfrom
pod-mutation-cr-example
Jun 11, 2025
Merged

Add PodMutation custom resource example#501
vbaltrusaitis-castai merged 3 commits intomasterfrom
pod-mutation-cr-example

Conversation

@vbaltrusaitis-castai
Copy link
Copy Markdown
Contributor

No description provided.

]
spotConfig = {
# mode can be "optional-spot", "only-spot", or "preferred-spot"
mode = "optional-spot"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

iirc only-spot is valid with distributionPercentage

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When I look at tests (for mothership mutations, and CR mutations mimic that behavior), it seems that distributionPercentage can be used with all modes: https://github.com/castai/pod-mutator/blob/main/internal/handler/partial_spot_test.go#L34. The code actually uses distributionPercentage either way and the only difference is what whether it removes some toleration, node selector, or affinity. Though maybe not all of those make sense to use equally.

@vbaltrusaitis-castai vbaltrusaitis-castai marked this pull request as ready for review June 11, 2025 14:03
@vbaltrusaitis-castai vbaltrusaitis-castai requested a review from a team as a code owner June 11, 2025 14:03
@vbaltrusaitis-castai vbaltrusaitis-castai merged commit e429ea1 into master Jun 11, 2025
7 checks passed
@vbaltrusaitis-castai vbaltrusaitis-castai deleted the pod-mutation-cr-example branch June 11, 2025 14:10
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