k8snetworkplumbingwg / multus-cni

A CNI meta-plugin for multi-homed pods in Kubernetes
Apache License 2.0
2.42k stars 584 forks source link

Clarification: which config options are required and which not? #1268

Closed micw closed 2 months ago

micw commented 7 months ago

Hello,

I have been playing around a bit with multus. The example configuration in https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/deployments/multus-daemonset.yml looks like that:

    {
      "name": "multus-cni-network",
      "type": "multus",
      "capabilities": {
        "portMappings": true
      },
      "delegates": [
        {
          "cniVersion": "0.3.1",
          "name": "default-cni-network",
          "plugins": [
            {
              "type": "flannel",
              "name": "flannel.1",
                "delegate": {
                  "isDefaultGateway": true,
                  "hairpinMode": true
                }
              },
              {
                "type": "portmap",
                "capabilities": {
                  "portMappings": true
                }
              }
          ]
        }
      ],
      "kubeconfig": "/etc/cni/net.d/multus.d/multus.kubeconfig"
    }

I saw that the resulting generated file in the filesystemwith multus 4.0.2 looks quite different:

  1. the structure is different,top level elements are "cniVersion", "name" and "plugins".
  2. The "kubeconfig" entry is auto-created under "plugins". If has always the value passed via command line argument "multus-kubeconfig-file-host" (or it's default), regardless of the value in the configmap
  3. "plugins/capabilities" seems also to be auto-generated, regardless of the value in the configmap

So my question is, is the config file in the yaml still in an up-to-date format? Are the enties like "capabilities" or "kubeconfig" required (or even used)? If not, it would make sense to update the example config.

dougbtv commented 5 months ago

Hopefully this doc can clarify? https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/docs/configuration.md

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.