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

Gateway API: add support for ReferenceGrant #4580

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelogs/unreleased/4580-skriss-deprecation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Gateway API: ReferencePolicy is deprecated, will be removed next release

Gateway API has renamed ReferencePolicy to ReferenceGrant in the v0.5.0 release, while retaining the former for one release to ease migration.
Contour currently supports both, but will drop support for ReferencePolicy in the next release.
Users of ReferencePolicies must migrate their resources to ReferenceGrants ahead of the next Contour release.
1 change: 1 addition & 0 deletions changelogs/unreleased/4580-skriss-small.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Gateway API: adds support for ReferenceGrant, which was formerly known as ReferencePolicy. To ease migration, _both_ resources are supported for this release, but ReferencePolicy support will be removed next release.
5 changes: 5 additions & 0 deletions cmd/contour/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,11 @@ func (s *Server) setupGatewayAPI(contourConfiguration contour_api_v1alpha1.Conto
s.log.WithError(err).WithField("resource", "referencepolicies").Fatal("failed to create informer")
}

// Inform on ReferenceGrants.
if err := informOnResource(&gatewayapi_v1alpha2.ReferenceGrant{}, eventHandler, mgr.GetCache()); err != nil {
s.log.WithError(err).WithField("resource", "referencegrants").Fatal("failed to create informer")
}

// Inform on Namespaces.
if err := informOnResource(&corev1.Namespace{}, eventHandler, mgr.GetCache()); err != nil {
s.log.WithError(err).WithField("resource", "namespaces").Fatal("failed to create informer")
Expand Down
1 change: 1 addition & 0 deletions examples/contour/02-role-contour.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ rules:
- gatewayclasses
- gateways
- httproutes
- referencegrants
- referencepolicies
- tlsroutes
verbs:
Expand Down
1 change: 1 addition & 0 deletions examples/gateway-provisioner/01-roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ rules:
- gatewayclasses
- gateways
- httproutes
- referencegrants
- referencepolicies
- tlsroutes
verbs:
Expand Down
1 change: 1 addition & 0 deletions examples/render/contour-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4852,6 +4852,7 @@ rules:
- gatewayclasses
- gateways
- httproutes
- referencegrants
- referencepolicies
- tlsroutes
verbs:
Expand Down
1 change: 1 addition & 0 deletions examples/render/contour-gateway-provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11626,6 +11626,7 @@ rules:
- gatewayclasses
- gateways
- httproutes
- referencegrants
- referencepolicies
- tlsroutes
verbs:
Expand Down
1 change: 1 addition & 0 deletions examples/render/contour-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4857,6 +4857,7 @@ rules:
- gatewayclasses
- gateways
- httproutes
- referencegrants
- referencepolicies
- tlsroutes
verbs:
Expand Down
1 change: 1 addition & 0 deletions examples/render/contour.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4852,6 +4852,7 @@ rules:
- gatewayclasses
- gateways
- httproutes
- referencegrants
- referencepolicies
- tlsroutes
verbs:
Expand Down
Loading