containernetworking / plugins

Some reference and example networking plugins, maintained by the CNI team.
Apache License 2.0
2.18k stars 777 forks source link

A question about tuning plugin exec seq #1075

Closed BurlyLuo closed 2 weeks ago

BurlyLuo commented 4 weeks ago

Hello Team:

cat <<EOF | kubectl apply -f -
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: macvlan-whereabouts-tuning-conf
spec:
  config: '{
    "cniVersion": "0.3.1",
    "name": "tuningexample",
    "plugins": [
       {
         "type": "macvlan",
         "master": "eth0",
         "mode": "bridge",
         "ipam": {
           "type": "whereabouts",
           "range": "15.15.1.200-15.15.1.205/24",
           "gateway": "15.15.1.1",
           "route": [
              { "dst": "0.0.0.0/0"
              }]
           }
       },
       {
         "type": "tuning",
         "sysctl": {
            "net.core.somaxconn": "500",
            "net.ipv4.conf.eth1.arp_filter": "1"
          }
       },
       {
         "type": "sbr"
       }
    ]
}'
EOF

For this case: when the tuning for sysctl

         "sysctl": {
            "net.core.somaxconn": "500",
            "net.ipv4.conf.eth1.arp_filter": "1"
          }

be executed. my focus is before the interface up or after it? there is one issue about IPV6 RS RA.

BurlyLuo commented 3 weeks ago

Tested. before the interface up. pls take reference: https://gitee.com/rowan-wcni/wcni-kind/tree/master/LabasCode/multus/10-kind-multus-macvlan-sbr-with-tuning