Skip to content

KEP 1645: fix ServiceExport conditions #5438

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MrFreezeex
Copy link
Member

@MrFreezeex MrFreezeex commented Jun 26, 2025

  • One-line PR description: Fix examples and change required conditions types in ServiceExports
  • Other comments:

Followup fixes from https://github.com/kubernetes/enhancements/pull/5437/files#r2169361973

ServiceExport definitions are introduced in: kubernetes-sigs/mcs-api#112

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 26, 2025
@k8s-ci-robot k8s-ci-robot requested review from JeremyOT and skitt June 26, 2025 15:51
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: MrFreezeex
Once this PR has been reviewed and has the lgtm label, please assign jeremyot for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/multicluster Categorizes an issue or PR as relevant to SIG Multicluster. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 26, 2025
@MrFreezeex MrFreezeex force-pushed the mcsapi-svcexport-condition-fix-reason branch from 90f2e48 to 55d870a Compare June 26, 2025 15:52
@MrFreezeex MrFreezeex force-pushed the mcsapi-svcexport-condition-fix-reason branch from 55d870a to d5b2a4f Compare June 26, 2025 16:10
@MrFreezeex MrFreezeex requested a review from tpantelis June 26, 2025 16:11
@mikemorris
Copy link
Member

mikemorris commented Jun 26, 2025

I'd suggest just using a simple Ready reason for that condition type, and similarly for Valid. The more complex/interesting reasons are typically for standardizing the "something is wrong" cases such as {type: Valid, status: False} or {type: Conflicted, status: true}

There's substantial prior art on standardized reasons over in https://github.com/kubernetes-sigs/gateway-api/blob/main/apis/v1/gateway_types.go#L974-L1027 with explanation of positive (status: True is good, like for type: Ready) vs negative polarity condition types (status: False is good, such as for type: Conflicted paired with something like reason: NoConflicts) too.

@MrFreezeex
Copy link
Member Author

I'd suggest just using a simple Ready reason for that condition type, and similarly for Valid. The more complex/interesting reasons are typically for standardizing the "something is wrong" cases such as {type: Valid, status: False} or {type: Conflicted, status: true}

There's substantial prior art on standardized reasons over in https://github.com/kubernetes-sigs/gateway-api/blob/main/apis/v1/gateway_types.go#L974-L1027 with explanation of positive (status: True is good, like for type: Ready) vs negative polarity condition types (status: False is good, such as for type: Conflicted paired with something like reason: NoConflicts) too.

Thanks for the link/suggestions! Hmm I guess then let's define those things in the MCS-API repo first and then fix up those example once done.

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2025
@mikemorris
Copy link
Member

@MrFreezeex I think it's actually fine to show the intent/example in the KEP first if we add a caveat that this is just an example and we hope to standardize these condition types and reasons in the project eventually? I expect that may take a bit longer and don't want to block this.

@MrFreezeex
Copy link
Member Author

MrFreezeex commented Jun 26, 2025

@MrFreezeex I think it's actually fine to show the intent/example in the KEP first if we add a caveat that this is just an example and we hope to standardize these condition types and reasons in the project eventually? I expect that may take a bit longer and don't want to block this.

Well we would probably have around ~10 case to define so I don't think this should take that long if it takes too long we can unblock that but the KEP was broken for years on this matter it can stay broken for a few more week(s) probably IMO

@mikemorris
Copy link
Member

mikemorris commented Jun 26, 2025

Sounds good - conditions like this are extensible too so this shouldn't be a limiting factor. Implementations can add their own types or reasons (especially if they can have implementation-specific failure scenarios, and we add/promote these later if broadly applicable), but covering the core set of expected states/conflicts would be great.

(The message field is often impl-specific for adding more specific detail to standard reasons FWIW.)

@MrFreezeex MrFreezeex force-pushed the mcsapi-svcexport-condition-fix-reason branch from d5b2a4f to 2bc4ef4 Compare June 27, 2025 15:51
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 27, 2025
@MrFreezeex
Copy link
Member Author

I adapted this vs my current (non definitive so far ofc!) proposal here: kubernetes-sigs/mcs-api#112 to showcase what it would look like

Add missing reason in the ServiceExport conditions example and adjust
the KEP to the reasons defined in the mcs-api repo.

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
@MrFreezeex MrFreezeex force-pushed the mcsapi-svcexport-condition-fix-reason branch from 2bc4ef4 to a96e064 Compare June 27, 2025 19:23
Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 27, 2025
@MrFreezeex MrFreezeex changed the title KEP 1645: fix ServiceExport conditions example KEP 1645: fix ServiceExport conditions Jun 27, 2025
@tpantelis
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/multicluster Categorizes an issue or PR as relevant to SIG Multicluster. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants