From the release notes:
> This release contains a fix related to the determination of the default interface, e.g. setting the default parameter to true in the network-status annotation based on the presence of a gateway in the CNI ADD success result ips.gateway and makes the determination of the default based on the first interface that has an associated value of gateway (using the interface index in the ips element in the CNI ADD success result).
> This provides flexibility especially in CRI-O which uses the first interface and IP addresses for the pod.IP in Kubernetes, therefore. Containerd functionality is unchanged in that it uses the value for the IP addresses specifically
> It's worth noting that CNI ADD success results which do not contain any interfaces will be discarded in this determination of the default, therefore it's recommended to set one with an associated gateway if aiming to have it be noted as the default.
See also:
https://github.com/k8snetworkplumbingwg/network-attachment-definition-client/releases/tag/v1.7.5https://github.com/k8snetworkplumbingwg/network-attachment-definition-client/pull/73
Previous version didn't account for accounts for the sandox interfaces when reporting the interfaces in the network-status annotation when calculating the default:true interface
This fixes the default:true for multiple interface returns from CNI for cluster default network, where all interfaces in that return were marked as default:true in the network-status
- if cleanup-config-on-exit is set delete generated multus
config file on exit.
- add an option to skip watch for master cni config and kubeconfig
as cleanup-config-on-exit with multus-conf-file=auto also triggered
the watch for cases when deletion of multus config is desired but watch isnt
- setup signal handling to allow config file cleanup on exit
Signed-off-by: adrianc <adrianc@nvidia.com>
This is needed to avoid issues with volume unmounts
when (other) pods exit as by default kubernetes mounts
as private.
Signed-off-by: adrianc <adrianc@nvidia.com>
APIReadyCheckFunc is used only in api, hence it can be decapitalize
to make its scope only in this package. This fix changes its scope.
In addition, api.APIReadyCheckFunc seems to be redundant so the name
is changed. Change the comment to fit to golang style, too.
deleteDefaultGWResult() may create 'routes:null' in CNI cache file
and it causes nil pointer access at addDefaultGWCacheBytes().
This code change prevents deleteDefaultGWResult() to generate
'routes:null' in cache file.
Multus v3.9.3 has `--multus-master-cni-file-name` flag to specify the
name of a primary CNI config file.
https://github.com/k8snetworkplumbingwg/multus-cni/blob/v3.9.3/images/entrypoint.sh#L22
In Multus v4.0.2, the thin plugin has the flag defined, but it is not
read and so does not have effect.
This pull request fixes the problem by making the thin plugin correctly
handles `--multus-master-cni-file-name` flag.
Fixes#1226
Signed-off-by: Hidehito Yabuuchi <hyab@preferred.jp>