Skip to content

Commit 176d152

Browse files
authored
Merge pull request #5202 from npinaeva/udn-acl-tier
UDN isolation: move ACLs to the higher-prio Primary tier
2 parents e947d8d + c58c193 commit 176d152

File tree

11 files changed

+105
-39
lines changed

11 files changed

+105
-39
lines changed

go-controller/pkg/libovsdb/util/acl.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,18 @@ func GetACLName(dbIDs *libovsdbops.DbObjectIDs) string {
8888
return fmt.Sprintf("%.63s", aclName)
8989
}
9090

91+
// BuildACLWithDefaultTier is used for the most ACL-related features with the default ACL tier.
92+
// That includes egress firewall, network policy, multicast.
93+
func BuildACLWithDefaultTier(dbIDs *libovsdbops.DbObjectIDs, priority int, match, action string, logLevels *ACLLoggingLevels,
94+
aclT ACLPipelineType) *nbdb.ACL {
95+
return BuildACL(dbIDs, priority, match, action, logLevels, aclT, types.DefaultACLTier)
96+
}
97+
9198
// BuildACL should be used to build ACL instead of directly calling libovsdbops.BuildACL.
9299
// It can properly set and reset log settings for ACL based on ACLLoggingLevels, and
93100
// set acl.Name and acl.ExternalIDs based on given DbIDs
94101
func BuildACL(dbIDs *libovsdbops.DbObjectIDs, priority int, match, action string, logLevels *ACLLoggingLevels,
95-
aclT ACLPipelineType) *nbdb.ACL {
102+
aclT ACLPipelineType, tier int) *nbdb.ACL {
96103
var options map[string]string
97104
var direction string
98105
switch aclT {
@@ -122,14 +129,13 @@ func BuildACL(dbIDs *libovsdbops.DbObjectIDs, priority int, match, action string
122129
log,
123130
externalIDs,
124131
options,
125-
types.DefaultACLTier,
132+
tier,
126133
)
127134
return ACL
128135
}
129136

130137
func BuildANPACL(dbIDs *libovsdbops.DbObjectIDs, priority int, match, action string, aclT ACLPipelineType, logLevels *ACLLoggingLevels) *nbdb.ACL {
131-
anpACL := BuildACL(dbIDs, priority, match, action, logLevels, aclT)
132-
anpACL.Tier = GetACLTier(dbIDs)
138+
anpACL := BuildACL(dbIDs, priority, match, action, logLevels, aclT, GetACLTier(dbIDs))
133139
return anpACL
134140
}
135141

go-controller/pkg/ovn/admin_network_policy_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func getANPGressACL(action, anpName, direction string, rulePriority int32,
9494
ruleIndex int32, ports *[]anpapi.AdminNetworkPolicyPort,
9595
namedPorts map[string][]libovsdbutil.NamedNetworkPolicyPort, banp bool) []*nbdb.ACL {
9696
retACLs := []*nbdb.ACL{}
97-
// we are not using BuildACL and instead manually building it on purpose so that the code path for BuildACL is also tested
97+
// we are not using BuildACLWithDefaultTier and instead manually building it on purpose so that the code path for BuildACLWithDefaultTier is also tested
9898
acl := nbdb.ACL{}
9999
acl.Action = action
100100
acl.Severity = nil

go-controller/pkg/ovn/base_network_controller_multicast.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ func (bnc *BaseNetworkController) createMulticastAllowPolicy(ns string, nsInfo *
119119
egressMatch := libovsdbutil.GetACLMatch(portGroupName, bnc.getMulticastACLEgrMatch(), aclDir)
120120
dbIDs := getNamespaceMcastACLDbIDs(ns, aclDir, bnc.controllerName)
121121
aclPipeline := libovsdbutil.ACLDirectionToACLPipeline(aclDir)
122-
egressACL := libovsdbutil.BuildACL(dbIDs, types.DefaultMcastAllowPriority, egressMatch, nbdb.ACLActionAllow, nil, aclPipeline)
122+
egressACL := libovsdbutil.BuildACLWithDefaultTier(dbIDs, types.DefaultMcastAllowPriority, egressMatch, nbdb.ACLActionAllow, nil, aclPipeline)
123123

124124
aclDir = libovsdbutil.ACLIngress
125125
ingressMatch := libovsdbutil.GetACLMatch(portGroupName, bnc.getMulticastACLIgrMatch(nsInfo), aclDir)
126126
dbIDs = getNamespaceMcastACLDbIDs(ns, aclDir, bnc.controllerName)
127127
aclPipeline = libovsdbutil.ACLDirectionToACLPipeline(aclDir)
128-
ingressACL := libovsdbutil.BuildACL(dbIDs, types.DefaultMcastAllowPriority, ingressMatch, nbdb.ACLActionAllow, nil, aclPipeline)
128+
ingressACL := libovsdbutil.BuildACLWithDefaultTier(dbIDs, types.DefaultMcastAllowPriority, ingressMatch, nbdb.ACLActionAllow, nil, aclPipeline)
129129

130130
acls := []*nbdb.ACL{egressACL, ingressACL}
131131
ops, err := libovsdbops.CreateOrUpdateACLsOps(bnc.nbClient, nil, bnc.GetSamplingConfig(), acls...)
@@ -186,7 +186,7 @@ func (bnc *BaseNetworkController) createDefaultDenyMulticastPolicy() error {
186186
for _, aclDir := range []libovsdbutil.ACLDirection{libovsdbutil.ACLEgress, libovsdbutil.ACLIngress} {
187187
dbIDs := getDefaultMcastACLDbIDs(mcastDefaultDenyID, aclDir, bnc.controllerName)
188188
aclPipeline := libovsdbutil.ACLDirectionToACLPipeline(aclDir)
189-
acl := libovsdbutil.BuildACL(dbIDs, types.DefaultMcastDenyPriority, match, nbdb.ACLActionDrop, nil, aclPipeline)
189+
acl := libovsdbutil.BuildACLWithDefaultTier(dbIDs, types.DefaultMcastDenyPriority, match, nbdb.ACLActionDrop, nil, aclPipeline)
190190
acls = append(acls, acl)
191191
}
192192
ops, err := libovsdbops.CreateOrUpdateACLsOps(bnc.nbClient, nil, bnc.GetSamplingConfig(), acls...)
@@ -228,7 +228,7 @@ func (bnc *BaseNetworkController) createDefaultAllowMulticastPolicy() error {
228228
match := libovsdbutil.GetACLMatch(rtrPGName, mcastMatch, aclDir)
229229
dbIDs := getDefaultMcastACLDbIDs(mcastAllowInterNodeID, aclDir, bnc.controllerName)
230230
aclPipeline := libovsdbutil.ACLDirectionToACLPipeline(aclDir)
231-
acl := libovsdbutil.BuildACL(dbIDs, types.DefaultMcastAllowPriority, match, nbdb.ACLActionAllow, nil, aclPipeline)
231+
acl := libovsdbutil.BuildACLWithDefaultTier(dbIDs, types.DefaultMcastAllowPriority, match, nbdb.ACLActionAllow, nil, aclPipeline)
232232
acls = append(acls, acl)
233233
}
234234

go-controller/pkg/ovn/base_network_controller_policy.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,11 @@ func (bnc *BaseNetworkController) addHairpinAllowACL() error {
252252
}
253253

254254
ingressACLIDs := bnc.getNetpolDefaultACLDbIDs(string(knet.PolicyTypeIngress))
255-
ingressACL := libovsdbutil.BuildACL(ingressACLIDs, types.DefaultAllowPriority, match,
255+
ingressACL := libovsdbutil.BuildACLWithDefaultTier(ingressACLIDs, types.DefaultAllowPriority, match,
256256
nbdb.ACLActionAllowRelated, nil, libovsdbutil.LportIngress)
257257

258258
egressACLIDs := bnc.getNetpolDefaultACLDbIDs(string(knet.PolicyTypeEgress))
259-
egressACL := libovsdbutil.BuildACL(egressACLIDs, types.DefaultAllowPriority, match,
259+
egressACL := libovsdbutil.BuildACLWithDefaultTier(egressACLIDs, types.DefaultAllowPriority, match,
260260
nbdb.ACLActionAllowRelated, nil, libovsdbutil.LportEgressAfterLB)
261261

262262
ops, err := libovsdbops.CreateOrUpdateACLsOps(bnc.nbClient, nil, nil, ingressACL, egressACL)
@@ -335,7 +335,7 @@ func (bnc *BaseNetworkController) addAllowACLFromNode(switchName string, mgmtPor
335335
}
336336
match := fmt.Sprintf("%s.src==%s", ipFamily, mgmtPortIP.String())
337337
dbIDs := getAllowFromNodeACLDbIDs(switchName, mgmtPortIP.String(), bnc.controllerName)
338-
nodeACL := libovsdbutil.BuildACL(dbIDs, types.DefaultAllowPriority, match,
338+
nodeACL := libovsdbutil.BuildACLWithDefaultTier(dbIDs, types.DefaultAllowPriority, match,
339339
nbdb.ACLActionAllowRelated, nil, libovsdbutil.LportIngress)
340340

341341
ops, err := libovsdbops.CreateOrUpdateACLsOps(bnc.nbClient, nil, bnc.GetSamplingConfig(), nodeACL)
@@ -388,9 +388,9 @@ func (bnc *BaseNetworkController) buildDenyACLs(namespace, pgName string, aclLog
388388
allowMatch := libovsdbutil.GetACLMatch(pgName, arpAllowPolicyMatch, aclDir)
389389
aclPipeline := libovsdbutil.ACLDirectionToACLPipeline(aclDir)
390390

391-
denyACL = libovsdbutil.BuildACL(bnc.getDefaultDenyPolicyACLIDs(namespace, aclDir, defaultDenyACL),
391+
denyACL = libovsdbutil.BuildACLWithDefaultTier(bnc.getDefaultDenyPolicyACLIDs(namespace, aclDir, defaultDenyACL),
392392
types.DefaultDenyPriority, denyMatch, nbdb.ACLActionDrop, aclLogging, aclPipeline)
393-
allowACL = libovsdbutil.BuildACL(bnc.getDefaultDenyPolicyACLIDs(namespace, aclDir, arpAllowACL),
393+
allowACL = libovsdbutil.BuildACLWithDefaultTier(bnc.getDefaultDenyPolicyACLIDs(namespace, aclDir, arpAllowACL),
394394
types.DefaultAllowPriority, allowMatch, nbdb.ACLActionAllow, nil, aclPipeline)
395395
return
396396
}

go-controller/pkg/ovn/egressfirewall.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ func (oc *DefaultNetworkController) addEgressFirewallRules(ef *egressFirewall, p
467467
func (oc *DefaultNetworkController) createEgressFirewallACLOps(ops []ovsdb.Operation, ruleIdx int, match, action, namespace, pgName string, aclLogging *libovsdbutil.ACLLoggingLevels) ([]ovsdb.Operation, error) {
468468
aclIDs := oc.getEgressFirewallACLDbIDs(namespace, ruleIdx)
469469
priority := types.EgressFirewallStartPriority - ruleIdx
470-
egressFirewallACL := libovsdbutil.BuildACL(
470+
egressFirewallACL := libovsdbutil.BuildACLWithDefaultTier(
471471
aclIDs,
472472
priority,
473473
match,

go-controller/pkg/ovn/gateway_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func generateAdvertisedUDNIsolationExpectedNB(testData []libovsdbtest.TestData,
4343
passMatches = append(passMatches, fmt.Sprintf("(%s.src == %s && %s.dst == %s)", ipPrefix, subnet, ipPrefix, subnet))
4444

4545
}
46-
passACL := libovsdbutil.BuildACL(
46+
passACL := libovsdbutil.BuildACLWithDefaultTier(
4747
GetAdvertisedNetworkSubnetsPassACLdbIDs(DefaultNetworkControllerName, networkName, networkID),
4848
types.AdvertisedNetworkPassPriority,
4949
strings.Join(passMatches, " || "),

go-controller/pkg/ovn/gress_policy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func (gp *gressPolicy) buildLocalPodACLs(portGroupName string, aclLogging *libov
288288
ipBlockMatches := gp.getMatchFromIPBlock(lportMatch, l4Match)
289289
for ipBlockIdx, ipBlockMatch := range ipBlockMatches {
290290
aclIDs := gp.getNetpolACLDbIDs(ipBlockIdx, protocol)
291-
acl := libovsdbutil.BuildACL(aclIDs, types.DefaultAllowPriority, ipBlockMatch, action,
291+
acl := libovsdbutil.BuildACLWithDefaultTier(aclIDs, types.DefaultAllowPriority, ipBlockMatch, action,
292292
aclLogging, gp.aclPipeline)
293293
createdACLs = append(createdACLs, acl)
294294
}
@@ -309,7 +309,7 @@ func (gp *gressPolicy) buildLocalPodACLs(portGroupName string, aclLogging *libov
309309
addrSetMatch = fmt.Sprintf("%s && %s && %s", l3Match, l4Match, lportMatch)
310310
}
311311
aclIDs := gp.getNetpolACLDbIDs(emptyIdx, protocol)
312-
acl := libovsdbutil.BuildACL(aclIDs, types.DefaultAllowPriority, addrSetMatch, action,
312+
acl := libovsdbutil.BuildACLWithDefaultTier(aclIDs, types.DefaultAllowPriority, addrSetMatch, action,
313313
aclLogging, gp.aclPipeline)
314314
if l3Match == "" {
315315
// if l3Match is empty, then no address sets are selected for a given gressPolicy.

go-controller/pkg/ovn/udn_isolation.go

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ const (
3030
DenySecondaryACL = "DenySecondary"
3131
// OpenPortACLPrefix is used to build per-pod ACLs, pod name should be added to the prefix to build a unique name
3232
OpenPortACLPrefix = "OpenPort-"
33+
// the same tier is used for all UDN isolation ACLs
34+
isolationTier = types.PrimaryACLTier
3335
)
3436

3537
// setupUDNACLs should be called after the node's management port was configured
@@ -63,7 +65,8 @@ func (oc *DefaultNetworkController) setupUDNACLs(mgmtPortIPs []net.IP) error {
6365
pgName := libovsdbutil.GetPortGroupName(pgIDs)
6466
egressDenyIDs := oc.getUDNACLDbIDs(DenySecondaryACL, libovsdbutil.ACLEgress)
6567
match := libovsdbutil.GetACLMatch(pgName, "", libovsdbutil.ACLEgress)
66-
egressDenyACL := libovsdbutil.BuildACL(egressDenyIDs, types.PrimaryUDNDenyPriority, match, nbdb.ACLActionDrop, nil, libovsdbutil.LportEgress)
68+
egressDenyACL := libovsdbutil.BuildACL(egressDenyIDs, types.PrimaryUDNDenyPriority, match, nbdb.ACLActionDrop,
69+
nil, libovsdbutil.LportEgress, isolationTier)
6770

6871
getARPMatch := func(direction libovsdbutil.ACLDirection) string {
6972
match := "("
@@ -89,15 +92,18 @@ func (oc *DefaultNetworkController) setupUDNACLs(mgmtPortIPs []net.IP) error {
8992

9093
egressARPIDs := oc.getUDNACLDbIDs(AllowHostARPACL, libovsdbutil.ACLEgress)
9194
match = libovsdbutil.GetACLMatch(pgName, getARPMatch(libovsdbutil.ACLEgress), libovsdbutil.ACLEgress)
92-
egressARPACL := libovsdbutil.BuildACL(egressARPIDs, types.PrimaryUDNAllowPriority, match, nbdb.ACLActionAllow, nil, libovsdbutil.LportEgress)
95+
egressARPACL := libovsdbutil.BuildACL(egressARPIDs, types.PrimaryUDNAllowPriority, match, nbdb.ACLActionAllow,
96+
nil, libovsdbutil.LportEgress, isolationTier)
9397

9498
ingressDenyIDs := oc.getUDNACLDbIDs(DenySecondaryACL, libovsdbutil.ACLIngress)
9599
match = libovsdbutil.GetACLMatch(pgName, "", libovsdbutil.ACLIngress)
96-
ingressDenyACL := libovsdbutil.BuildACL(ingressDenyIDs, types.PrimaryUDNDenyPriority, match, nbdb.ACLActionDrop, nil, libovsdbutil.LportIngress)
100+
ingressDenyACL := libovsdbutil.BuildACL(ingressDenyIDs, types.PrimaryUDNDenyPriority, match, nbdb.ACLActionDrop,
101+
nil, libovsdbutil.LportIngress, isolationTier)
97102

98103
ingressARPIDs := oc.getUDNACLDbIDs(AllowHostARPACL, libovsdbutil.ACLIngress)
99104
match = libovsdbutil.GetACLMatch(pgName, getARPMatch(libovsdbutil.ACLIngress), libovsdbutil.ACLIngress)
100-
ingressARPACL := libovsdbutil.BuildACL(ingressARPIDs, types.PrimaryUDNAllowPriority, match, nbdb.ACLActionAllow, nil, libovsdbutil.LportIngress)
105+
ingressARPACL := libovsdbutil.BuildACL(ingressARPIDs, types.PrimaryUDNAllowPriority, match, nbdb.ACLActionAllow,
106+
nil, libovsdbutil.LportIngress, isolationTier)
101107

102108
ingressAllowIDs := oc.getUDNACLDbIDs(AllowHostSecondaryACL, libovsdbutil.ACLIngress)
103109
match = "("
@@ -114,7 +120,8 @@ func (oc *DefaultNetworkController) setupUDNACLs(mgmtPortIPs []net.IP) error {
114120
}
115121
match += ")"
116122
match = libovsdbutil.GetACLMatch(pgName, match, libovsdbutil.ACLIngress)
117-
ingressAllowACL := libovsdbutil.BuildACL(ingressAllowIDs, types.PrimaryUDNAllowPriority, match, nbdb.ACLActionAllowRelated, nil, libovsdbutil.LportIngress)
123+
ingressAllowACL := libovsdbutil.BuildACL(ingressAllowIDs, types.PrimaryUDNAllowPriority, match, nbdb.ACLActionAllowRelated,
124+
nil, libovsdbutil.LportIngress, isolationTier)
118125

119126
ops, err := libovsdbops.CreateOrUpdateACLsOps(oc.nbClient, nil, oc.GetSamplingConfig(), egressDenyACL, egressARPACL, ingressARPACL, ingressDenyACL, ingressAllowACL)
120127
if err != nil {
@@ -200,11 +207,11 @@ func (oc *DefaultNetworkController) setUDNPodOpenPortsOps(podNamespacedName stri
200207
// don't return on parseErr, as we need to cleanup potentially present ACLs from the previous config
201208
ingressIDs := oc.getUDNOpenPortDbIDs(podNamespacedName, libovsdbutil.ACLIngress)
202209
ingressACL := libovsdbutil.BuildACL(ingressIDs, types.PrimaryUDNAllowPriority,
203-
ingressMatch, nbdb.ACLActionAllowRelated, nil, libovsdbutil.LportIngress)
210+
ingressMatch, nbdb.ACLActionAllowRelated, nil, libovsdbutil.LportIngress, isolationTier)
204211

205212
egressIDs := oc.getUDNOpenPortDbIDs(podNamespacedName, libovsdbutil.ACLEgress)
206213
egressACL := libovsdbutil.BuildACL(egressIDs, types.PrimaryUDNAllowPriority,
207-
egressMatch, nbdb.ACLActionAllow, nil, libovsdbutil.LportEgress)
214+
egressMatch, nbdb.ACLActionAllow, nil, libovsdbutil.LportEgress, isolationTier)
208215

209216
var err error
210217
if ingressMatch == "" && egressMatch == "" || parseErr != nil {
@@ -288,8 +295,8 @@ func BuildAdvertisedNetworkSubnetsDropACL(advertisedNetworkSubnetsAddressSet add
288295
strings.Join(dropMatches, " || "),
289296
nbdb.ACLActionDrop,
290297
nil,
291-
libovsdbutil.LportEgressAfterLB)
292-
dropACL.Tier = types.PrimaryACLTier
298+
libovsdbutil.LportEgressAfterLB,
299+
isolationTier)
293300
return dropACL
294301
}
295302

@@ -331,8 +338,8 @@ func (bnc *BaseNetworkController) addAdvertisedNetworkIsolation(nodeName string)
331338
strings.Join(passMatches, " || "),
332339
nbdb.ACLActionPass,
333340
nil,
334-
libovsdbutil.LportEgressAfterLB)
335-
passACL.Tier = types.PrimaryACLTier
341+
libovsdbutil.LportEgressAfterLB,
342+
isolationTier)
336343

337344
ops, err = libovsdbops.CreateOrUpdateACLsOps(bnc.nbClient, ops, nil, passACL)
338345
if err != nil {
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package ovn
2+
3+
import (
4+
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
5+
libovsdbops "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/ops"
6+
libovsdbutil "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/libovsdb/util"
7+
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb"
8+
libovsdbtest "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing/libovsdb"
9+
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
10+
11+
. "github.com/onsi/ginkgo/v2"
12+
. "github.com/onsi/gomega"
13+
)
14+
15+
var _ = Describe("UDN Isolation", func() {
16+
BeforeEach(func() {
17+
Expect(config.PrepareTestConfig()).To(Succeed())
18+
})
19+
20+
It("ACLs should be updated to the Primary tier ", func() {
21+
config.OVNKubernetesFeature.EnableMultiNetwork = true
22+
config.OVNKubernetesFeature.EnableNetworkSegmentation = true
23+
fakeController := getFakeController(DefaultNetworkControllerName)
24+
25+
// build port group with one ACL that has default tier
26+
pgIDs := fakeController.getSecondaryPodsPortGroupDbIDs()
27+
pgName := libovsdbutil.GetPortGroupName(pgIDs)
28+
egressDenyIDs := fakeController.getUDNACLDbIDs(DenySecondaryACL, libovsdbutil.ACLEgress)
29+
match := libovsdbutil.GetACLMatch(pgName, "", libovsdbutil.ACLEgress)
30+
// in the real code we use BuildACL here instead of BuildACLWithDefaultTier
31+
egressDenyACL := libovsdbutil.BuildACLWithDefaultTier(egressDenyIDs, types.PrimaryUDNDenyPriority, match, nbdb.ACLActionDrop,
32+
nil, libovsdbutil.LportEgress)
33+
// required to make sure port group correctly references the ACL
34+
egressDenyACL.UUID = egressDenyIDs.String() + "-UUID"
35+
pg := libovsdbutil.BuildPortGroup(pgIDs, nil, []*nbdb.ACL{egressDenyACL})
36+
37+
nbClient, nbCleanup, err := libovsdbtest.NewNBTestHarness(libovsdbtest.TestSetup{
38+
NBData: []libovsdbtest.TestData{egressDenyACL, pg},
39+
}, nil)
40+
Expect(err).NotTo(HaveOccurred())
41+
defer nbCleanup.Cleanup()
42+
fakeController.nbClient = nbClient
43+
44+
// now run the setupUDNACLs function which should create all ACLs and update the existing ACLs to the Primary tier
45+
Expect(fakeController.setupUDNACLs(nil)).To(Succeed())
46+
47+
// verify that the egressDenyACL is updated to the Primary 0
48+
acls, err := libovsdbops.FindACLs(nbClient, []*nbdb.ACL{egressDenyACL})
49+
Expect(err).NotTo(HaveOccurred())
50+
Expect(acls).To(HaveLen(1))
51+
Expect(acls[0].Tier).To(Equal(types.PrimaryACLTier))
52+
})
53+
})

go-controller/pkg/types/const.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const (
7474
TransitSwitchToRouterPrefix = "tstor-"
7575
RouterToTransitSwitchPrefix = "rtots-"
7676

77-
// ACL Default Tier Priorities
77+
// DefaultACLTier Priorities
7878

7979
// Default routed multicast allow acl rule priority
8080
DefaultRoutedMcastAllowPriority = 1013
@@ -91,16 +91,15 @@ const (
9191
// Deny priority for isolated advertised networks
9292
AdvertisedNetworkDenyPriority = 1050
9393

94-
// ACL PlaceHolderACL Tier Priorities
94+
// PrimaryACLTier Priorities
95+
9596
PrimaryUDNAllowPriority = 1001
9697
// Default deny acl rule priority
9798
PrimaryUDNDenyPriority = 1000
9899

99100
// ACL Tiers
100101
// Tier 0 is called Primary as it is evaluated before any other feature-related Tiers.
101102
// Currently used for User Defined Network Feature.
102-
// NOTE: When we upgrade from an OVN version without tiers to the new version with
103-
// tiers, all values in the new ACL.Tier column will be set to 0.
104103
PrimaryACLTier = 0
105104
// Default Tier for all ACLs
106105
DefaultACLTier = 2

0 commit comments

Comments
 (0)