Skip to content

Commit

Permalink
Deprecate the multicastInterfaces option (#3898)
Browse files Browse the repository at this point in the history
Some distros have exposed the multicastInterfaces option and made it
uncommented in the config file. antrea-agent would crash if a cluster
upgrades to v1.7.0 but doesn't remove the option. This patch adds the
option back and deprecates it in a compatible manner.

Signed-off-by: Quan Tian <qtian@vmware.com>
  • Loading branch information
tnqn committed Jun 15, 2022
1 parent 2e35c5f commit 5519d9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/antrea-agent/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ func (o *Options) validateMulticastConfig() error {
return err
}
}
if len(o.config.Multicast.MulticastInterfaces) == 0 && len(o.config.MulticastInterfaces) > 0 {
klog.InfoS("The multicastInterfaces option is deprecated, please use multicast.multicastInterfaces instead")
o.config.Multicast.MulticastInterfaces = o.config.MulticastInterfaces
}
}
return nil
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/config/agent/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ type AgentConfig struct {
// 2. TransportInterfaceCIDRs
// 3. The Node IP
TransportInterfaceCIDRs []string `yaml:"transportInterfaceCIDRs,omitempty"`
// The names of the interfaces on Nodes that are used to forward multicast traffic.
// Defaults to transport interface if not set.
// Deprecated: use Multicast.MulticastInterfaces instead.
MulticastInterfaces []string `yaml:"multicastInterfaces,omitempty"`
// Multicast configuration options.
Multicast MulticastConfig `yaml:"multicast,omitempty"`
// AntreaProxy contains AntreaProxy related configuration options.
Expand Down

0 comments on commit 5519d9e

Please sign in to comment.