Skip to content
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

API Review for v0.6.0 release #1538

Closed
wants to merge 3 commits into from

Conversation

robscott
Copy link
Member

What type of PR is this?
/kind api-change

What this PR does / why we need it:
THIS PR WILL NOT MERGE, THIS IS INTENDED FOR REVIEW ONLY.

This is a draft PR to facilitate the review of the v0.6.0 release of Gateway API. This compares the current state of /apis from the main branch with the state in v0.5.

Does this PR introduce a user-facing change?:
Changelog will be computed separately.

/cc @bowei @shaneutt @youngnick @howardjohn @keithmattix @mikemorris
/assign @khenidak @thockin

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Nov 16, 2022
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 16, 2022
@robscott
Copy link
Member Author

/hold forever

@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 Nov 16, 2022
Copy link

@thockin thockin left a comment

Choose a reason for hiding this comment

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

I admit I only skimmed validation code.

Overall this seems OK. The prep-meeting helped a lot.

apis/v1alpha2/gateway_types.go Show resolved Hide resolved
apis/v1alpha2/gateway_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/grpcroute_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/grpcroute_types.go Outdated Show resolved Hide resolved
// non-empty, then the implementation MUST accept exactly one of these two
// routes, determined by the following criteria, in order:
//
// * The oldest Route based on creation timestamp.
Copy link

Choose a reason for hiding this comment

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

This is very specific - do we need it to be so specific? What if the implementation intends to prefer GRPC - not allowed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd rather start with more specific/stringent requirements. Wherever possible, I'd like to have consistent and portable behavior. If in the future an implementation wants to prefer GRPC we could make a carve out for how to do that here (likely something along the lines of "any deviation from this approach must be clearly documented").

Copy link
Contributor

Choose a reason for hiding this comment

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

More detail on this decision is in the GEP for GRPCRoute. Originally we wanted to allow a GRPCRoute and HTTPRoute sharing a hostname to coexist in this scenario and to merge their individual rules very similarly to how two HTTPRoutes would do so.

But after investigating what it would take to enable this behavior in a couple of prospective implementations (Traffic Director and Istio), we realized that it would be difficult to accomplish this. In the interest of starting with something simple that we can evolve from, we changed to the resolution mechanism here, which is the same as for two HTTPRoutes with rules with tied precedence. It would be a backward-compatible change to enable this merge behavior in the future.

apis/v1alpha2/validation/grpcroute.go Outdated Show resolved Hide resolved
// Spec defines the desired state of ReferenceGrant.
Spec ReferenceGrantSpec `json:"spec,omitempty"`

// Note that `Status` sub-resource has been excluded at the
Copy link

Choose a reason for hiding this comment

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

I'm still skeptical of this :)

Copy link
Member Author

@robscott robscott Dec 7, 2022

Choose a reason for hiding this comment

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

I think the most likely use of this would be for implementations to publish the references this grant is actually allowing. I think that would be very helpful, but I'm less sure if that would actually scale. As we've found in previous cases, it's much safer to leave room for it than to leave it out altogether.

// * TCPRoute
// * TLSRoute
// * UDPRoute
Kind Kind `json:"kind"`
Copy link

Choose a reason for hiding this comment

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

Required or optional? Can I grant a whole namespace access to a thing? Wouldn't that be the norm if this went upstream?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think we should make this optional. The purpose of ReferenceGrant is to enable very specific kinds of references, not broad access. I'd be worried that allowing ReferenceGrant to be used to enable such broad access could have unintended consequences. For example, someone might use the broad access with the intent of allowing access for all kinds they currently know about, but in the future a new kind may be added that results in a significant change to the access that an open ReferenceGrant like that would enable.

apis/v1beta1/validation/common.go Outdated Show resolved Hide resolved
apis/v1beta1/validation/common.go Show resolved Hide resolved
Copy link

@khenidak khenidak left a comment

Choose a reason for hiding this comment

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

This review covers types /apis/v1alpha2 directory. Rest to follow.

apis/v1alpha2/gateway_types.go Show resolved Hide resolved
apis/v1alpha2/gateway_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/gateway_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/grpcroute_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/grpcroute_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/httproute_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/shared_types.go Show resolved Hide resolved
apis/v1alpha2/shared_types.go Show resolved Hide resolved
apis/v1alpha2/referencegrant_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/referencegrant_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/util/translator/httproute.go Outdated Show resolved Hide resolved
apis/v1alpha2/util/translator/shared_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/util/translator/shared_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/validation/common.go Show resolved Hide resolved
apis/v1alpha2/validation/grpcroute_test.go Show resolved Hide resolved
Copy link

@khenidak khenidak left a comment

Choose a reason for hiding this comment

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

That is everything i have. Thank you for this effort. I really appreciate it.

apis/v1beta1/util/validation/common.go Outdated Show resolved Hide resolved
apis/v1beta1/util/validation/common_test.go Outdated Show resolved Hide resolved
apis/v1alpha2/validation/tlsroute_test.go Show resolved Hide resolved
apis/v1alpha2/validation/tlsroute_test.go Outdated Show resolved Hide resolved
apis/v1alpha2/validation/udproute_test.go Show resolved Hide resolved
apis/v1alpha2/validation/udproute_test.go Outdated Show resolved Hide resolved
// Group is the group of the referent. For example, "networking.k8s.io".
// When unspecified (empty string), core API group is inferred.
// Group is the group of the referent. For example, "gateway.networking.k8s.io".
// When unspecified or empty string, core API group is inferred.

Choose a reason for hiding this comment

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

This is going to be interesting to see in patch updates. Consider this

create w/ Group: "G"
update other fields w/ Group field value: "G"
Update other fields w/Group field value:"" // which will be defaulted to "" removing "G" which is definitly not the intention. Can we double check the behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried this out with the following transition:

    tls:
      certificateRefs:
      - kind: Secret
        group: "g"
        name: foo-example-com-cert
    tls:
      certificateRefs:
      - kind: Secret
        name: foo-example-com-cert

As you expected, after applying step 2, the group became "" instead of "g". With that said, I'm not sure why you would remove a group from a manifest, or if you were trying to just update a subset, why you wouldn't use patch. This is likely something we need to more clearly document, but I'm hoping it doesn't represent a typical workflow.

apis/v1beta1/util/translator/httproute.go Outdated Show resolved Hide resolved
k8s-ci-robot added a commit that referenced this pull request Dec 2, 2022
@robscott robscott mentioned this pull request Dec 3, 2022
apis/v1beta1/gateway_types.go Show resolved Hide resolved
apis/v1alpha2/grpcroute_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/grpcroute_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/grpcroute_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/grpcroute_types.go Show resolved Hide resolved
apis/v1alpha2/grpcroute_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/grpcroute_types.go Show resolved Hide resolved
apis/v1alpha2/grpcroute_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/httproute_types.go Outdated Show resolved Hide resolved
apis/v1alpha2/shared_types.go Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

@robscott: GitHub didn't allow me to request PR reviews from the following users: gnossen.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

Any suggestions for how to rework this? I think this is just talking about HTTP/2 Cleartext which would mean no cipher.

/cc @gnossen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@shaneutt shaneutt mentioned this pull request Dec 14, 2022
@robscott
Copy link
Member Author

Thanks for the reviews @khenidak and @thockin! Can you formally approve these changes for v0.6.0 release?

@khenidak
Copy link

/approve /lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: khenidak, 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

@thockin
Copy link

thockin commented Dec 21, 2022

Kal - each bot cmd goes on its own line :)

/lgtm

See? :)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 21, 2022
@robscott
Copy link
Member Author

Thanks to everyone for the reviews! We've released v0.6.0 and linked to this as where the release was approved. Will close this out.

@robscott robscott closed this Dec 27, 2022
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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants