enhancements icon indicating copy to clipboard operation
enhancements copied to clipboard

KEP 1645: fix ServiceExport conditions

Open MrFreezeex opened this issue 5 months ago • 7 comments

  • One-line PR description: Fix examples and change required conditions types in ServiceExports
  • Issue link: https://github.com/kubernetes/enhancements/issues/1645
  • Other comments:

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

ServiceImport definitions are introduced in: https://github.com/kubernetes-sigs/mcs-api/pull/112

MrFreezeex avatar Jun 26 '25 15:06 MrFreezeex

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.

mikemorris avatar Jun 26 '25 16:06 mikemorris

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

MrFreezeex avatar Jun 26 '25 16:06 MrFreezeex

@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.

mikemorris avatar Jun 26 '25 17:06 mikemorris

@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

MrFreezeex avatar Jun 26 '25 17:06 MrFreezeex

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.)

mikemorris avatar Jun 26 '25 17:06 mikemorris

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

MrFreezeex avatar Jun 27 '25 15:06 MrFreezeex

/lgtm

tpantelis avatar Jun 30 '25 14:06 tpantelis

Triage notes:

  • Updates per a prior plan triage note in the mcs-api repo have been done as of https://github.com/kubernetes-sigs/mcs-api/pull/112#issuecomment-3161460719
  • Ready for review again

lauralorenz avatar Aug 12 '25 16:08 lauralorenz

/lgtm

tpantelis avatar Aug 12 '25 17:08 tpantelis

(fixed a little typo because I realized I confused the status on the Condition field in this text :sweat_smile:)

MrFreezeex avatar Aug 13 '25 00:08 MrFreezeex

/lgtm

tpantelis avatar Aug 13 '25 01:08 tpantelis

/approve

skitt avatar Aug 26 '25 16:08 skitt

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MrFreezeex, skitt, tpantelis

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

The pull request process is described 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 avatar Aug 26 '25 16:08 k8s-ci-robot

/hold cancel

MrFreezeex avatar Aug 26 '25 17:08 MrFreezeex