Skip to content

Commit 45cc3e0

Browse files
committed
OCPBUGS-49997: Inhanced the info for the k8s.v1.cni.cncf.io/policy-for annotation
1 parent 85ac095 commit 45cc3e0

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

modules/configuration-ovnk-multi-network-policy.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ a|
2626

2727
|====
2828

29+
The `k8s.v1.cni.cncf.io/policy-for` annotation can be used in a `MultiNetworkPolicy` CRD to specify what network policy from a pod with multiple networks applies to a secondary network interface.
30+
2931
For example, the following multi-network policy is valid only if the `subnets` field is defined in the secondary network CNI configuration for the secondary network named `blue2`:
3032

3133
.Example multi-network policy that uses a pod selector
@@ -36,7 +38,7 @@ kind: MultiNetworkPolicy
3638
metadata:
3739
name: allow-same-namespace
3840
annotations:
39-
k8s.v1.cni.cncf.io/policy-for: blue2
41+
k8s.v1.cni.cncf.io/policy-for: blue2 <1>
4042
spec:
4143
podSelector:
4244
ingress:

modules/nw-networkpolicy-create-cli.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ metadata:
7171
name: deny-by-default
7272
ifdef::multi[]
7373
annotations:
74-
k8s.v1.cni.cncf.io/policy-for:<namespace_name>/<network_name>
74+
k8s.v1.cni.cncf.io/policy-for: <network_name>
7575
endif::multi[]
7676
spec:
7777
podSelector: {}

modules/nw-networkpolicy-deny-all-allowed.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ metadata:
4646
name: deny-by-default
4747
namespace: my-project <1>
4848
annotations:
49-
k8s.v1.cni.cncf.io/policy-for: <namespace_name>/<network_name> <2>
49+
k8s.v1.cni.cncf.io/policy-for: <network_name> <2>
5050
spec:
5151
podSelector: {} <3>
5252
policyTypes: <4>

0 commit comments

Comments
 (0)