Skip to content

Commit 7386316

Browse files
committed
changing name
1 parent 328e12b commit 7386316

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mgmtfn/k8splugin/driver.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,12 @@ func getEPSpec(pInfo *cniapi.CNIPodAttr) (*epSpec, error) {
355355
resp.Network = netw
356356
resp.Group = epg
357357

358-
// non-system pod with no EPG ? configure it in namespace
358+
// Pods need to be in a group to allow policies to be applied after pod
359+
// creation, if a group is not specified by the user, then place pod
360+
// into a group shared across the pod's namespace, as contiv group is part
361+
// of a network and network is in a k8s namespace
359362
if pInfo.K8sNameSpace != "kube-system" && len(resp.Group) <= 0 {
360-
resp.Group = pInfo.K8sNameSpace
363+
resp.Group = "ns-" + pInfo.K8sNameSpace + "-default"
361364
}
362365

363366
resp.EndpointID = pInfo.InfraContainerID

0 commit comments

Comments
 (0)