-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
Quality / Stability / Reliability
-
3
-
False
-
-
False
-
Green
-
-
None
Description of problem:
The example available in our docs https://docs.openshift.com/container-platform/4.16/virt/vm_networking/virt-connecting-vm-to-linux-bridge.html#virt-creating-linux-bridge-nad-cli_virt-connecting-vm-to-linux-bridge is incorrect.
Version-Release number of selected component (if applicable):
4.14+ for the multiline string 4.16+ for the boolean
How reproducible:
Docs
Steps to Reproduce:
1. Go to https://docs.openshift.com/container-platform/4.16/virt/vm_networking/virt-connecting-vm-to-linux-bridge.html#virt-creating-linux-bridge-nad-cli_virt-connecting-vm-to-linux-bridge 2. "Creating a Linux bridge NAD by using the command line" example
Actual results:
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: bridge-network
annotations:
k8s.v1.cni.cncf.io/resourceName: bridge.network.kubevirt.io/bridge-interface
spec:
config: '{
"cniVersion": "0.3.1",
"name": "bridge-network",
"type": "cnv-bridge",
"bridge": "bridge-interface",
"macspoofchk": false,
"vlan": 100,
"disableContainerInterface": "true",
"preserveDefaultVlan": false
}'
Expected results:
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: bridge-network
annotations:
k8s.v1.cni.cncf.io/resourceName: bridge.network.kubevirt.io/bridge-interface
spec:
config: | # <<< CHANGED
{
"cniVersion": "0.3.1",
"name": "bridge-network",
"type": "cnv-bridge",
"bridge": "bridge-interface",
"macspoofchk": false,
"vlan": 100,
"disableContainerInterface": true, # <<< CHANGED
"preserveDefaultVlan": false
} # <<< CHANGED
Additional info:
The existing snippet is not using a valid YAML for multiline string - try pasting it to https://www.yamllint.com/. The "disableContainerInterface" should be a boolean https://github.com/containernetworking/plugins/blob/fec2d62676cbe4f2fd587b4840c7fc021bead3f9/plugins/main/bridge/bridge.go#L63.
- links to
(1 links to)