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

Conformance: Set Accepted Condition Type on Gateway Status #368

Closed
Tracked by #305 ...
kate-osborn opened this issue Jan 13, 2023 · 1 comment · Fixed by #633
Closed
Tracked by #305 ...

Conformance: Set Accepted Condition Type on Gateway Status #368

kate-osborn opened this issue Jan 13, 2023 · 1 comment · Fixed by #633
Assignees
Labels
area/gateway/core Relates to all Core features of Gateway conformance Relates to passing Gateway API conformance tests enhancement New feature or request refined Requirements are refined and the issue is ready to be implemented.
Milestone

Comments

@kate-osborn
Copy link
Contributor

kate-osborn commented Jan 13, 2023

Set Accepted Condition Type on Gateway Status.

From the spec:

Accepted is true when the controller managing the Gateway is syntactically and semantically valid enough to produce some configuration in the underlying data plane.

Accepted does NOT indicate whether the configuration has been propagated to the data plane.

The table below outlines the spec's reasons for the Accepted Condition Type, their values, and details on when to use them:

Reason Value Details
Accepted True Gateway is syntactically and semantically valid enough to produce some configuration.
ListenersNotValid True When one or more listeners have an invalid or unsupported configuration. Set to true when some configuration can still be generated for the Gateway.
ListenersNotValid False When one or more listeners have an invalid or unsupported configuration. Set to false when NO configuration can be generated for the Gateway.
Invalid False Use when the Gateway is syntactically or semantically invalid.
UnsupportedAddress False The requested address in the Gateway is not supported.
Pending Unknown Used when no controller has reconciled the Gateway. NKG does not need to set this.

We should prefer to use these reasons with the Accepted Condition Type, but we are not strictly limited to these reasons. We can define our own reason if the need arises.

Questions:

  • Since we don't support the GatewayAddress field on Gateway, should we use the UnsupportedAddress condition when a user specifies it? No, use UnsupportedValue reason.
  • Do we have the appropriate validation in place for Gateway resources to set the Accepted Condition Type? Validation is done for listeners. Some work is required to determine whether a Gateway is valid, partially valid, or invalid.
  • NKG only supports one Gateway. If multiple Gateways are defined for the NKG GatewayClass, we select one Gateway and ignore the others. What status should we write to the ignored Gateways? Accepted/false/reason?? I think we need our own reason for this case. Currently, we set Ready/False/GetawayReasonGatewayConflict. Instead, set to Accepted/False/GetawayReasonGatewayConflict and also fix type Getaway -> Gateway

Acceptance Criteria:

  • Implement Accepted condition type according to the description above
  • Add unit tests
  • Update gateway API compatibility doc. Make sure to callout the GatewayReasonGatewayConflict reason and explain that we only support one Gateway
@pleshakov pleshakov added enhancement New feature or request area/gateway/core Relates to all Core features of Gateway and removed proposal labels Apr 7, 2023
@pleshakov pleshakov added this to the v1.0.0 milestone Apr 7, 2023
@pleshakov pleshakov modified the milestones: v1.0.0, v0.4.0 Apr 26, 2023
@kate-osborn
Copy link
Contributor Author

@kate-osborn kate-osborn added the refined Requirements are refined and the issue is ready to be implemented. label May 3, 2023
@kate-osborn kate-osborn self-assigned this May 4, 2023
@kate-osborn kate-osborn moved this from 🆕 New to 🔖 To Do in NGINX Gateway Fabric May 4, 2023
@kate-osborn kate-osborn moved this from 🔖 To Do to 🏗 In Progress in NGINX Gateway Fabric May 4, 2023
@kate-osborn kate-osborn moved this from 🏗 In Progress to 👀 In Review in NGINX Gateway Fabric May 9, 2023
@pleshakov pleshakov added the conformance Relates to passing Gateway API conformance tests label May 10, 2023
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in NGINX Gateway Fabric May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gateway/core Relates to all Core features of Gateway conformance Relates to passing Gateway API conformance tests enhancement New feature or request refined Requirements are refined and the issue is ready to be implemented.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants