k8snetworkplumbingwg / multus-cni

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

default-network annotation is limited to just Multus namespace #1291

Open dougbtv opened 1 month ago

dougbtv commented 1 month ago

The general gist is that the v1.multus-cni.io/default-network annotation is limited to just annotations in the multus namespace.

From this snippet:

    // The CRD object of default network should only be defined in multusNamespace
    networks, err := parsePodNetworkAnnotation(netAnnot, conf.MultusNamespace)

Found @: https://github.com/k8snetworkplumbingwg/multus-cni/blob/9f5c0239a804a90bf8913c9a386ca50eff9ce0cc/pkg/k8sclient/k8sclient.go#L606-L607

Is this really the functionality that we want? I'd argue that it should follow the typical conventions for a selection annotation.

It's not in the documentation for it @ https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/docs/configuration.md#specify-default-cluster-network-in-pod-annotations