Skip to content

Commit

Permalink
review's comments
Browse files Browse the repository at this point in the history
Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
  • Loading branch information
mlavacca committed Sep 13, 2022
1 parent be186db commit 842d722
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions internal/annotations/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ func ExtractHostAliases(anns map[string]string) ([]string, bool) {
// ExtractUnmanagedGatewayClassMode extracts the value of the unmanaged gateway
// mode annotation.
func ExtractUnmanagedGatewayClassMode(anns map[string]string) string {
if anns == nil {
return ""
}
return anns[GatewayClassUnmanagedAnnotation]
}

Expand Down
4 changes: 2 additions & 2 deletions internal/controllers/gateway/gateway_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (r *GatewayReconciler) SetupWithManager(mgr ctrl.Manager) error {
// -----------------------------------------------------------------------------

// gatewayHasMatchingGatewayClass is a watch predicate which filters out reconciliation events for
// gateway objects which aren't supported by this controller and not using an unmanaged GatewayClass.
// gateway objects which aren't supported by this controller or not using an unmanaged GatewayClass.
func (r *GatewayReconciler) gatewayHasMatchingGatewayClass(obj client.Object) bool {
gateway, ok := obj.(*gatewayv1beta1.Gateway)
if !ok {
Expand All @@ -150,7 +150,7 @@ func (r *GatewayReconciler) gatewayHasMatchingGatewayClass(obj client.Object) bo
}

// gatewayClassMatchesController is a watch predicate which filters out events for gatewayclasses which
// aren't configured with the required ControllerName and not annotated as unmanaged.
// aren't configured with the required ControllerName or not annotated as unmanaged.
func (r *GatewayReconciler) gatewayClassMatchesController(obj client.Object) bool {
gatewayClass, ok := obj.(*gatewayv1beta1.GatewayClass)
if !ok {
Expand Down

0 comments on commit 842d722

Please sign in to comment.