-
Notifications
You must be signed in to change notification settings - Fork 493
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
Update Gateway/Listener status for consistency #1888
Update Gateway/Listener status for consistency #1888
Conversation
/retest that is a new error for sure |
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @howardjohn! Lots of great cleanup in here. Adding a hold because this feels like it should have several approvals before merging.
/hold
// This reason is used with the "Ready" condition when one or | ||
// more Listeners have an invalid or unsupported configuration | ||
// and cannot be configured on the Gateway. | ||
// Deprecated: Ready is reserved for future use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like it should move to "Programmed"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mentioned this in #1832 but left it out since it seemed controversial.
I will add it if folks want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I liked the way you specified it in #1832 (comment). I think it could be fine as long as we have the "can be present when Accepted is True" caveat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it back
apis/v1beta1/gateway_types.go
Outdated
// "Ready" is a reserved condition type for future use. It should not be used by implementations. | ||
// Note: its not really "deprecated", but rather "reserved"; however, deprecated triggers Go linters | ||
// to alert about usage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rationale from the PR description here makes sense to me:
This condition has no implementations; while it may have some future value, we cannot justify the additional reason going GA without usage. Additionally, it has caused confusion by the subtle distinction between Programmed and Ready, and has "stolen" some useful Reasons to be not Programmed.
I think it would be helpful to provide a bit more context in the type definition though. Maybe describe that we want to reserve this term to represent that all configuration has fully propagated. Although we recognize that this is not possible for most implementations today, we are reserving this term for that purpose if it ever becomes broadly implementable.
I'm not really sure what the best mechanism is for this. I like the idea of a deprecation warning because that should show up in most linters. At some point in the future we may be able to move this out of type definitions altogether and just into something like implementation guidelines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @liwenwu who mentioned they were using this condition in the call yesterday
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AWS VPC Lattice Gateway Controller creates a AWS VPC lattice service network (SN) object for each K8S gateway object. After this VPC lattice service network(SN) is fully provisioned, the controller set the status as follow:
status:
conditions:
- lastTransitionTime: "2023-03-28T04:43:40Z"
message: 'aws-gateway-arn: arn:aws:vpc-lattice:us-west-2:xxxxxxxx:servicenetwork/sn-06aa98be0c9c95af6'
reason: Reconciled
status: "True"
type: Accepted
This means, all Pods inside the cluster(VPC) can access all HTTPRoutes behind the K8S Gateway. TLDR, through K8S Gateway and able to access all Lattice service(s) in that Lattice Service Network
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe describe that we want to reserve this term to represent that all configuration has fully propagated. Although we recognize that this is not possible for most implementations today, we are reserving this term for that purpose if it ever becomes broadly implementable.
This wording is pretty close, how about:
// "Ready" is a reserved condition type for future use. It should not be used by implementations. | |
// Note: its not really "deprecated", but rather "reserved"; however, deprecated triggers Go linters | |
// to alert about usage. | |
// "Ready" is a reserved condition type for future use. It should not be used by implementations. | |
// Note: This condition is not really "deprecated", but rather "reserved"; however, deprecated triggers Go linters | |
// to alert about usage. | |
// | |
// If used in the future, "Ready" will represent the final state where all configuration is confirmed good | |
// _and has completely propagated to the data plane_. That is, it is a _guarantee_ that, as soon as something | |
// sees the Condition as `true`, then connections will be correctly routed _immediately_. | |
// | |
// This is a very strong guarantee, and to date no implementation has satisfied it enough to implement it. | |
// This reservation can be discussed in the future if necessary. |
Edit: You know you've been writing specs for too long when text like that comes out first go. Sigh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these definitions of the two conditions "Programmed" and "Ready" are fine, but the names should be reversed. Intuitively, programmed would be this future "final confirmed routed connections" state. I would think most people would think "Programmed" means having routes configured (i.e., the gateway has been programmed), not just that the gateway is up and running with addresses that you can send requests to. I would call that state "Ready", since you could argue that the gateway is ready to accept requests, it's just not yet programmed (i.e., it doesn't know where to route them, so it will return 404s).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @youngnick , that looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frankbu that makes sense in isolation, however a bunch of other Kubernetes objects already use Ready
to mean something like what we're using it for in this PR, so we're trying to keep the language consistent with other Kubernetes usage.
LGTM, I'll leave someone else to add the official one though. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: howardjohn, shaneutt 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 |
Thanks @howardjohn! /lgtm |
Removing hold, we've got more than enough approvals on this. /hold cancel |
What type of PR is this?
/kind documentation
What this PR does / why we need it:
Supercedes #1886
Fixes #1832
Fixes #1877
This PR attempts to introduce a bit more consistency into Gateway conditions, while reducing churn. There are 4 changes here:
This condition has no implementations; while it may have some future value, we cannot justify the additional reason going GA without usage. Additionally, it has caused confusion by the subtle distinction between Programmed and Ready, and has "stolen" some useful Reasons to be not Programmed.
This is expected to have no user impact, as no implementation supports this.
This does not make sense on a Listener, as Listeners do not have addresses
Accepted is about static analysis of the configuration; assigning an address is about actually programming the resources, so it fits more in Programmed
Lack of resources is a valid reason to not program the data plane; with the reservation of Ready this is needed in Programmed.
Does this PR introduce a user-facing change?: