Skip to content

Commit 2777def

Browse files
docs: Update docs for NetworkFence
This patch updates the docs for NetworkFence with NetworkFenceClassName related changes. Signed-off-by: Niraj Yadav <[email protected]>
1 parent 6c43ba3 commit 2777def

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

docs/networkfence.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22

33
NetworkFence is a cluster-scoped custom resource that allows Kubernetes to invoke "Network fence" operation on a storage provider.
44

5-
The user needs to specify the list of CIDR blocks on which network fencing operation will be performed; alongside the csi driver name.
5+
The user needs to specify the list of CIDR blocks on which network fencing operation will be performed along with either of
6+
`networkFenceClassName` or the csi driver name. When a `networkFenceClassName` is specified, the secret name, namespace
7+
and parameters are read from the `NetworkFenceClass`.
8+
9+
When both `networkFenceClassName` and `driver` are specified `networkFenceClassName` has the higher precedence.
10+
11+
> **Note:** Specifying `driver`, `secret` and `parameters` inside `NetworkFence` is deprecated, users are encouraged
12+
> to use `networkFenceClassName` along with a `NetworkFenceClass` instead.
13+
614
The creation of NetworkFence CR will add a network fence, and its deletion will undo the operation.
715

816
## Fence Operation
@@ -13,10 +21,14 @@ kind: NetworkFence
1321
metadata:
1422
name: network-fence-sample
1523
spec:
16-
driver: example.driver
24+
networkFenceClassName: network-fence-class
1725
cidrs:
1826
- 10.90.89.66/32
1927
- 11.67.12.42/24
28+
# The fields driver, secret and parameters are deprecated.
29+
# It is recommended to use networkFenceClassName to specify these.
30+
# Note: `driver` is referred to as the `provisioner` in NetworkFenceClass.
31+
driver: example.driver
2032
secret:
2133
name: fence-secret
2234
namespace: default
@@ -26,7 +38,8 @@ spec:
2638
2739
> **Note**: Creation of a NetworkFence CR blocks access to the corresponding CIDR block; which is then unblocked the CR deletion.
2840
29-
- `provisioner`: specifies the name of storage provisioner.
41+
- `networkFenceClassName`: specifies the name of the NetworkFenceClass.
42+
- `driver`: specifies the name of storage provisioner.
3043
- `cidrs`: refers to the CIDR blocks on which the mentioned fence/unfence operation is to be performed.
3144
- `secret`: refers to the kubernetes secret required for network fencing operation.
3245
- `name`: specifies the name of the secret

0 commit comments

Comments
 (0)