Skip to content

Commit e1dac7e

Browse files
author
Kate Osborn
committed
Add constant for ancestor max
1 parent 61f5ea4 commit e1dac7e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/mode/static/state/graph/policy_ancestor.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ import (
88
"github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers"
99
)
1010

11+
const maxAncestors = 16
12+
1113
func ancestorsFull(
1214
ancestors []v1alpha2.PolicyAncestorStatus,
1315
newAncestor v1.ParentReference,
1416
ctlrName string,
1517
) bool {
16-
if len(ancestors) < 16 {
18+
if len(ancestors) < maxAncestors {
1719
return false
1820
}
1921

0 commit comments

Comments
 (0)