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

Handle multiple Gateway resources #139

Merged
merged 5 commits into from
Jul 18, 2022
Merged

Conversation

pleshakov
Copy link
Contributor

Proposed changes

Previously, NGINX Gateway only supported a single Gateway resource
that must have had 'nginx-gateway/gateway' namespace/name.

This PR removes that hard-corded requirement: Now NGINX Gateway will
select the Gateway resource among all resources that belong to
NGINX Gateway (i.e. reference NGINX Gateway corresponding GatewayClass).
In case of multiple Gateway resources, NGINX Gateway will use a
deterministic conflict resolution strategy: it will choose the oldest
resource based on the creation timestamp. If the timestamps are equal,
NGINX Gateway will chose the resource that appears alphabetically first
based on its namespace and then name.

Previously, NGINX Gateway only supported a single Gateway resource
that must have had 'nginx-gateway/gateway' namespace/name.

This commit removes that hard-corded requirement: Now NGINX Gateway will
select the Gateway resource among all resources that belong to
NGINX Gateway (i.e. reference NGINX Gateway corresponding GatewayClass).
In case of multiple Gateway resources, NGINX Gateway will use a
deterministic conflict resolution strategy: it will choose the oldest
resource based on the creation timestamp. If the timestamps are equal,
NGINX Gateway will chose the resource that appears alphabetically first
based on its namespace and then name.
internal/state/graph.go Outdated Show resolved Hide resolved
@kate-osborn kate-osborn mentioned this pull request Jul 12, 2022
6 tasks
@pleshakov pleshakov merged commit 157c011 into main Jul 18, 2022
@pleshakov pleshakov deleted the feature/multiple-gateways branch July 18, 2022 16:35
@pleshakov pleshakov restored the feature/multiple-gateways branch August 9, 2022 17:12
@lucacome lucacome deleted the feature/multiple-gateways branch August 16, 2022 18:03
@lucacome lucacome restored the feature/multiple-gateways branch August 16, 2022 18:03
@lucacome lucacome added the enhancement New feature or request label Aug 16, 2022
@pleshakov pleshakov deleted the feature/multiple-gateways branch September 9, 2022 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants