Skip to content

Commit 6543abe

Browse files
committed
fixed spelling
1 parent f347d49 commit 6543abe

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cns/middlewares/k8sSwiftV2.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ func (k *K8sSWIFTv2Middleware) IPConfigsRequestHandlerWrapper(defaultHandler, fa
6363
for i := range ipConfigsResp.PodIPInfo {
6464
ipInfo := &ipConfigsResp.PodIPInfo[i]
6565
// there will be no pod connectivity to and from those pods
66-
var defaultDenyEngressPolicy, defaultDenyIngressPolicy policy.Policy
66+
var defaultDenyEgressPolicy, defaultDenyIngressPolicy policy.Policy
6767

6868
if defaultDenyACLbool && ipInfo.NICType == cns.InfraNIC {
69-
defaultDenyEngressPolicy, err = getEndpointPolicy(string(policy.ACLPolicy), cns.ActionTypeBlock, cns.DirectionTypeOut, 10_000)
69+
defaultDenyEgressPolicy, err = getEndpointPolicy(string(policy.ACLPolicy), cns.ActionTypeBlock, cns.DirectionTypeOut, 10_000)
7070
if err != nil {
7171
logger.Errorf("failed to add default deny acl's for pod %v with err %v", podInfo.Name(), err)
7272
}
@@ -76,8 +76,8 @@ func (k *K8sSWIFTv2Middleware) IPConfigsRequestHandlerWrapper(defaultHandler, fa
7676
logger.Errorf("failed to add default deny acl's for pod %v with err %v", podInfo.Name(), err)
7777
}
7878

79-
ipInfo.EndpointPolicies = append(ipInfo.EndpointPolicies, defaultDenyEngressPolicy, defaultDenyIngressPolicy)
80-
logger.Printf("Created endpoint policies for defaultDenyEngressPolicy and defaultDenyIngressPolicy")
79+
ipInfo.EndpointPolicies = append(ipInfo.EndpointPolicies, defaultDenyEgressPolicy, defaultDenyIngressPolicy)
80+
logger.Printf("Created endpoint policies for defaultDenyEgressPolicy and defaultDenyIngressPolicy")
8181

8282
break
8383
}

cns/middlewares/k8sSwiftV2_windows_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ func TestAddDefaultDenyACL(t *testing.T) {
147147
},
148148
}
149149
var allEndpoints []policy.Policy
150-
var defaultDenyEngressPolicy, defaultDenyIngressPolicy policy.Policy
150+
var defaultDenyEgressPolicy, defaultDenyIngressPolicy policy.Policy
151151
var err error
152152

153-
defaultDenyEngressPolicy, err = getEndpointPolicy("ACL", "Block", "Out", 10_000)
153+
defaultDenyEgressPolicy, err = getEndpointPolicy("ACL", "Block", "Out", 10_000)
154154
if err != nil {
155155
fmt.Printf("failed to create endpoint policy")
156156
}
@@ -159,7 +159,7 @@ func TestAddDefaultDenyACL(t *testing.T) {
159159
fmt.Printf("failed to create endpoint policy")
160160
}
161161

162-
allEndpoints = append(allEndpoints, defaultDenyEngressPolicy, defaultDenyIngressPolicy)
162+
allEndpoints = append(allEndpoints, defaultDenyEgressPolicy, defaultDenyIngressPolicy)
163163
assert.Equal(t, err, nil)
164164

165165
// Normalize both slices so there is no extra spacing, new lines, etc

0 commit comments

Comments
 (0)