Add validation webhook for ClusterTopology resource #251
Merged
Ronkahn21 merged 8 commits intoNov 14, 2025
Conversation
gflarity
reviewed
Nov 6, 2025
gflarity
reviewed
Nov 6, 2025
gflarity
reviewed
Nov 6, 2025
gflarity
reviewed
Nov 6, 2025
gflarity
reviewed
Nov 6, 2025
gflarity
reviewed
Nov 6, 2025
gflarity
requested changes
Nov 6, 2025
gflarity
left a comment
Contributor
There was a problem hiding this comment.
Left a few comments. Also, the design calls that both domains and keys must be unique but I didn't notice a check for the Keys being unique.
danbar2
reviewed
Nov 9, 2025
3ad456a to
f978975
Compare
Ronkahn21
requested changes
Nov 9, 2025
Ronkahn21
reviewed
Nov 9, 2025
shayasoolin
reviewed
Nov 10, 2025
17309e6 to
5780289
Compare
gflarity
previously approved these changes
Nov 12, 2025
renormalize
suggested changes
Nov 12, 2025
renormalize
left a comment
Contributor
There was a problem hiding this comment.
Thanks @shmuel-runai! Posted a few fits - please take a look.
shayasoolin
approved these changes
Nov 12, 2025
sanjaychatterjee
approved these changes
Nov 13, 2025
Design ref: docs/designs/topology.md * Implement validating webhook that enforces topology domain hierarchy, valid Kubernetes label keys, and immutability constraints on updates * Add comprehensive test coverage for create and update validation * Register ClusterTopology validation webhook with operator
* Add ValidatingWebhookConfiguration for ClusterTopology validation * Add webhook labels and helper template in charts configuration * Configure webhook to validate CREATE and UPDATE operations on clustertopologies resources with failurePolicy set to Fail
* Remove reduant namespace from the helm chart helm * Add Testing for unique keys * Add UT * Misc code cleanup
* Add crd test base on envtest for testing API server checks * Remove redundant checks from the webhook (and UT) * Code cleanup
…/handler.go Co-authored-by: Saketh Kalaga <51327242+renormalize@users.noreply.github.com> Signed-off-by: shmuel-runai <149931913+shmuel-runai@users.noreply.github.com>
…/clustertopology.go Co-authored-by: Saketh Kalaga <51327242+renormalize@users.noreply.github.com> Signed-off-by: shmuel-runai <149931913+shmuel-runai@users.noreply.github.com>
…/clustertopology.go Co-authored-by: Saketh Kalaga <51327242+renormalize@users.noreply.github.com> Signed-off-by: shmuel-runai <149931913+shmuel-runai@users.noreply.github.com>
2f14a4a to
bcf3763
Compare
Contributor
|
@Ronkahn21 can we get an approval from you as well, since you requested changes last and that is blocking the merge of this PR? Thanks. @shmuel-runai while merging the PR please clean up unnecessary commit logs created during the review cycle in the commit message. Thanks. |
Ronkahn21
approved these changes
Nov 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind feature
/kind api
What this PR does / why we need it:
Which issue(s) this PR fixes:
Implements validation webhook for ClusterTopology
Special notes for your reviewer:
Does this PR introduce a API change?
Additional documentation e.g., enhancement proposals, usage docs, etc.: