Girish Moodalbail
unread,Jun 10, 2021, 1:01:39 PM6/10/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Dan Williams, Girish M G (GmG), Miguel Duarte de Mora Barroso, Yun Zhou, ovn-kub...@googlegroups.com
Hello Dan,
Additional OVN Networks to a Pod is still provisioned through Multus calling OVN K8s CNI. Multus will call OVN K8s CNI as many times as the number of OVN Networks for Pod.
Say, a Pod needs an additional storage network on top of the default OVN network. We define ovn-storage network-attachment-definition like below
apiVersion: "
k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: ovn-storage
spec:
config: '{
"cniVersion": "0.4.0",
"name": "ovn-storage",
"primary": false,
"net_cidr": "
10.193.0.0/16/26",
"mtu": 9000,
"type": "ovn-k8s-cni-overlay",
"logFile": "/var/log/ovn-kubernetes/ovn-k8s-cni-overlay.log",
"logLevel": "5",
"logfile-maxsize": 100,
"logfile-maxbackups": 5,
"logfile-maxage": 5
}'
and pod spec like below
apiVersion: v1
kind: Pod
metadata:
name: ubuntu2
annotations:
k8s.v1.cni.cncf.io/networks: default/ovn-storage
spec:
containers:
- name: ubuntu3
The Multus config has `ovn-primary` as the default network.
cni-conf.json: |
{
"cniVersion": "0.4.0",
"name": "multus-cni-network",
"type": "multus",
"logLevel": "debug",
"logFile": "/var/log/multus.log",
"logToStderr": false,
"systemNamespaces": ["kube-system"],
"delegates": [
{
"cniVersion": "0.4.0",
"type": "ovn-k8s-cni-overlay",
"name": "ovn-primary",
"logFile": "/var/log/ovn-kubernetes/ovn-k8s-cni-overlay.log",
"logLevel": "5",
"logfile-maxsize": 100,
"logfile-maxbackups": 5,
"logfile-maxage": 5
}
],
"confDir": "/etc/cni/net.d",
"readinessindicatorfile": "/etc/cni/net.d/10-ovn-kubernetes.conf",
"kubeconfig": "/etc/cni/net.d/multus.d/multus.kubeconfig"
}
With this, Multus will
- first setup ovn-primary network through ovn-k8s-cni-overlay and ovn-primary configuration
- next it will setup ovn-storage network through ovn-k8s-cni-overlay and ovn-primary configuration
Regards,
~Girish
On 6/10/21, 8:45 AM, "
ovn-kub...@googlegroups.com on behalf of Dan Williams" <
ovn-kub...@googlegroups.com on behalf of
dc...@redhat.com> wrote:
External email: Use caution opening links or attachments
To view this discussion on the web visit
https://groups.google.com/d/msgid/ovn-kubernetes/31dfab7678736b2c68b16b75e4ac49c7b0d1f95f.camel%40redhat.com.