Skip to content

Conversation

kflynn
Copy link
Contributor

@kflynn kflynn commented Aug 26, 2025

Signed-off-by: Flynn [email protected]

/kind feature

Add Mesh as an experimental, cluster-scoped Gateway API resource

This API definition is mostly copied straight from the GEP. The GEP has been tweaked to match places where it wasn't an exact copy.

Note also that this includes a tweak to hack/update-protos to not rely on $GOPATH being in the environment (because on my machine, that was resulting in an unintended change to the version to protoc-gen-go which was breaking tests).

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 26, 2025
@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/gep PRs related to Gateway Enhancement Proposal(GEP) size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 26, 2025
@kflynn kflynn force-pushed the flynn/api-3949 branch 2 times, most recently from afbf562 to b48f5ee Compare August 26, 2025 18:52
@kflynn kflynn force-pushed the flynn/api-3949 branch 2 times, most recently from 14f5bd5 to 7bba59c Compare August 26, 2025 20:46
@shaneutt shaneutt self-assigned this Aug 27, 2025
@shaneutt shaneutt moved this to Review in Release v1.4.0 Aug 27, 2025
@shaneutt shaneutt added this to the v1.4.0 milestone Aug 27, 2025
Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks @kflynn!

Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks @kflynn! Would like to see LGTM from another mesh lead here before this merges.

/cc @howardjohn @LiorLieberman @mikemorris
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kflynn, robscott

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 Aug 28, 2025
//
// +kubebuilder:validation:MaxLength=64
// +optional
Description *string `json:"description,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

any examples of descriptions we anticipate to have here? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have the field in Gateway, so I added it here for parallelism. 🙂 Probably not a bad idea to have an example in user-facing docs.

MeshReasonAccepted MeshConditionReason = "Accepted"

// This reason is used with the "Accepted" condition when the Mesh was not
// accepted because the parametersRef field refers to
Copy link
Member

@LiorLieberman LiorLieberman Sep 3, 2025

Choose a reason for hiding this comment

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

is this expected to be an exhaustive-list, or just examples?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Parallel with Gateway, it's somewhere in between. This is the preferred set. It is possible to use other values, but a controller should have a very reason for doing so.

// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=8
// +kubebuilder:default={{type: "Accepted", status: "Unknown", reason:"Pending", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"},{type: "Programmed", status: "Unknown", reason:"Pending", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}}
Copy link
Member

Choose a reason for hiding this comment

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

nit: just confirming my understanding, this default kicks in when MeshStatus is not empty, (e.g with supportedFeatures) and Conditions are empty. And the defaults on XMesh.status kicks in when Status is not set at all. is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again, parallel with Gateway: when the object is created, the API server will give it an Accepted: Unknown status with reason Pending. Eventually it'll be picked up by a controller, and the controller will update the Accepted status. (It's well known, I think, that I hate having things change the spec behind the user's back, but status is different. 🙂)

Copy link
Member

Choose a reason for hiding this comment

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

My question is more on the double defaults we have, one here and one here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is also parallel to Gateway. 😂 I think it might be worth revisiting both of them...

Copy link
Member

@LiorLieberman LiorLieberman left a comment

Choose a reason for hiding this comment

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

looks good to me, left a few comments

@LiorLieberman
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 3, 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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. kind/gep PRs related to Gateway Enhancement Proposal(GEP) lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

7 participants