Skip to content

Commit

Permalink
feat: enable ReferenceGrant controller if Gateway feature gate turned…
Browse files Browse the repository at this point in the history
… on (#3519)

* feat: enable ReferenceGrant controller if Gateway feature gate turned on

* update CHANGELOG

* Update CHANGELOG.md

Co-authored-by: Patryk Małek <[email protected]>

---------

Co-authored-by: Patryk Małek <[email protected]>
  • Loading branch information
randmonkey and pmalek authored Feb 9, 2023
1 parent d839f48 commit ba09da5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ Adding a new version? You'll need three changes:
[#3496](https://github.com/Kong/kubernetes-ingress-controller/pull/3496)
- The `ReferenceGrant` has been promoted to beta.
[#3507](https://github.com/Kong/kubernetes-ingress-controller/pull/3507)
- Enable `ReferenceGrant` if `Gateway` feature gate is turned on (default).
[#3519](https://github.com/Kong/kubernetes-ingress-controller/pull/3519)

### Fixed

Expand Down
6 changes: 3 additions & 3 deletions internal/manager/controllerdef.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ func setupControllers(
return nil, fmt.Errorf("ingress version picker failed: %w", err)
}

referenceGrantsEnabled := featureGates[gatewayAlphaFeature] && ShouldEnableCRDController(
referenceGrantsEnabled := featureGates[gatewayFeature] && ShouldEnableCRDController(
schema.GroupVersionResource{
Group: gatewayv1alpha2.GroupVersion.Group,
Version: gatewayv1alpha2.GroupVersion.Version,
Group: gatewayv1beta1.GroupVersion.Group,
Version: gatewayv1beta1.GroupVersion.Version,
Resource: "referencegrants",
},
restMapper,
Expand Down

0 comments on commit ba09da5

Please sign in to comment.