Skip to content

KEP 1645: updates ServiceExport conditions #5437

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

Merged

Conversation

MrFreezeex
Copy link
Member

@MrFreezeex MrFreezeex commented Jun 26, 2025

  • One-line PR description: Update ServiceExport conditions to match what we actually have in the mcs-api repo
  • Other comments:

ServiceExport conditions in the KEP are not reflecting what's actually done in the CRD as this predates the addition of the Condition type in Kubernetes.

This commit essentially put back all the condition types that we actually have in MCS-API code and change the reference in the example (the regular kubernetes type requires a message to be added!)

ServiceExport conditions in the KEP are not reflecting what's actually
done in the CRD as this predates the addition of the Condition type in
Kubernetes.

This commit essentially put back all the condition types that we
actually have in MCS-API code and change the reference in the example
(the regular kubernetes type requires a message to be added!)

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
@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 14:13
@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/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 26, 2025
@MrFreezeex
Copy link
Member Author

/cc @tpantelis @mikemorris

// Users should not expect detailed per-cluster information in the
// conflict message.
ServiceExportConflict = "Conflict"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we should just link to the Go code in the mcs-api repo rather than copying here and having to keep it up to date?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm I don't think that works very well because when we are doing the opposite meaning modifying the KEP to then update the code there it is significantly more clear what you want to actually achieve to update this inline I think

Copy link
Contributor

@tpantelis tpantelis Jun 26, 2025

Choose a reason for hiding this comment

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

Apparently we haven't been doing that workflow ☹️ Or perhaps we shouldn't expose Go code in the KEP and leave that implementation detail to the mcs-api repo. Eg, to me, it doesn't seem important in this document what Go struct is used to define the conditions or what Go constant name is used to define a condition type. Perhaps we provide examples solely in YAML format as is done on L458 below. I guess I see this doc as mainly outlining/defining concepts but perhaps I'm wrong there...

Copy link
Member Author

@MrFreezeex MrFreezeex Jun 26, 2025

Choose a reason for hiding this comment

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

AFAIK for new fields and things like that we have been doing this workflow mostly, and it should probably have been done for this condition change a while ago too.

I don't think that it's super important that this go code inline match absolutely 1:1 what we have in the mcs-api repo, it's not a big deal if small details drift. This one isn't that small though and the most important part is that I personally got super confused and had to debug this for longer than necessary when I did the Cilium implementation because I had to discover that the message field was required now so at the very least the yaml update below solves that...

Copy link
Contributor

Choose a reason for hiding this comment

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

OK.

BTW: while the message field is required in the CRD def, it can be empty. I was wondering about that too initially. When using the Go structs, Message is a non-pointer so is rendered as message: "" if not specified in code. However reason cannot be empty as it has a regex pattern which disallows empty.

Copy link
Member Author

@MrFreezeex MrFreezeex Jun 26, 2025

Choose a reason for hiding this comment

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

Argh indeed I forgot about Reason vs Message I definitely want to update that to not bamboozle future implementers :/

Copy link
Member Author

Choose a reason for hiding this comment

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

here is the PR fixing that: #5437

Copy link
Member Author

Choose a reason for hiding this comment

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

If I am copy pasting this correctly it would work better :/: #5438

@skitt
Copy link
Member

skitt commented Jun 26, 2025

I don’t think we can avoid having a duplicate.

/approve

Thanks!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 26, 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 26, 2025
@k8s-ci-robot k8s-ci-robot merged commit 63d4f6f into kubernetes:master Jun 26, 2025
4 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.34 milestone Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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