add ip_pref CNI options for primary pod ip
This fixes the TODO of this function and also expands on how the primary pod ip is selected. This change allows the operator to prefer ipv4, ipv6, or retain the ordering provided by the return results of the CNI plugins. This makes it much more flexible for ops to configure containerd and how IPs are set on the pod. Signed-off-by: Michael Crosby <michael@thepasture.io>
This commit is contained in:
@@ -111,6 +111,13 @@ type CniConfig struct {
|
||||
// a temporary backward-compatible solution for them.
|
||||
// TODO(random-liu): Deprecate this option when kubenet is deprecated.
|
||||
NetworkPluginConfTemplate string `toml:"conf_template" json:"confTemplate"`
|
||||
// IPPreference specifies the strategy to use when selecting the main IP address for a pod.
|
||||
//
|
||||
// Options include:
|
||||
// * ipv4, "" - (default) select the first ipv4 address
|
||||
// * ipv6 - select the first ipv6 address
|
||||
// * cni - use the order returned by the CNI plugins, returning the first IP address from the results
|
||||
IPPreference string `toml:"ip_pref" json:"ipPref"`
|
||||
}
|
||||
|
||||
// Mirror contains the config related to the registry mirror
|
||||
|
||||
Reference in New Issue
Block a user