Skip to content

Commit fe885c8

Browse files
committed
multicast: set igmp query interval by adding igmpQueryInterval in agent.conf
Signed-off-by: Bin Liu <biliu@vmware.com>
1 parent bae66ec commit fe885c8

14 files changed

Lines changed: 68 additions & 18 deletions

File tree

build/charts/antrea/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Kubernetes: `>= 1.16.0-0`
7676
| kubeAPIServerOverride | string | `""` | Address of Kubernetes apiserver, to override any value provided in kubeconfig or InClusterConfig. |
7777
| logVerbosity | int | `0` | |
7878
| multicastInterfaces | list | `[]` | Names of the interfaces on Nodes that are used to forward multicast traffic. |
79+
| igmpQueryInterval | int | `125`| The interval for antrea-agent to send IGMP query to pods, time uint is second.
7980
| noSNAT | bool | `false` | Whether or not to SNAT (using the Node IP) the egress traffic from a Pod to the external network. |
8081
| nodeIPAM.clusterCIDRs | list | `[]` | CIDR ranges to use when allocating Pod IP addresses. |
8182
| nodeIPAM.enable | bool | `false` | Enable Node IPAM in Antrea |

build/charts/antrea/conf/antrea-agent.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ multicastInterfaces:
224224
{{- toYaml . | nindent 2 }}
225225
{{- end }}
226226

227+
# The interval for antrea-agent to send IGMP query to pods, time uint is second.
228+
# Defaults to 125 seconds.
229+
igmpQueryInterval: {{ .Values.igmpQueryInterval }}
230+
227231
# The network CIDRs of the interface on Node which is used for tunneling or routing the traffic across
228232
# Nodes. If there are multiple interfaces configured the same network CIDR, the first one is used. The
229233
# IP address used for tunneling or routing traffic to remote Nodes is decided in the following order of

build/charts/antrea/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ transportInterface: ""
3030
transportInterfaceCIDRs: []
3131
# -- Names of the interfaces on Nodes that are used to forward multicast traffic.
3232
multicastInterfaces: []
33+
# -- The interval for antrea-agent to send IGMP query to pods, time uint is second.
34+
# Defaults to 125 seconds.
35+
igmpQueryInterval: 125
3336
# -- Default MTU to use for the host gateway interface and the network interface
3437
# of each Pod. By default, antrea-agent will discover the MTU of the Node's
3538
# primary interface and adjust it to accommodate for tunnel encapsulation

build/yamls/antrea-aks.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ data:
270270
# Defaults to transport interface if not set.
271271
multicastInterfaces:
272272
273+
# The interval for antrea-agent to send IGMP query to pods, time uint is second.
274+
# Defaults to 125 seconds.
275+
igmpQueryInterval: 125
276+
273277
# The network CIDRs of the interface on Node which is used for tunneling or routing the traffic across
274278
# Nodes. If there are multiple interfaces configured the same network CIDR, the first one is used. The
275279
# IP address used for tunneling or routing traffic to remote Nodes is decided in the following order of
@@ -3486,7 +3490,7 @@ spec:
34863490
kubectl.kubernetes.io/default-container: antrea-agent
34873491
# Automatically restart Pods with a RollingUpdate if the ConfigMap changes
34883492
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
3489-
checksum/config: 4554a36b927c6e64fdbc53b4d4c64673d48c9c829ec444e3be6e699ade8481b6
3493+
checksum/config: 20facf53caa00bcd92c0756c1f7ea86b9788ec46f66519a482ac468e86ba7f70
34903494
labels:
34913495
app: antrea
34923496
component: antrea-agent
@@ -3726,7 +3730,7 @@ spec:
37263730
annotations:
37273731
# Automatically restart Pod if the ConfigMap changes
37283732
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
3729-
checksum/config: 4554a36b927c6e64fdbc53b4d4c64673d48c9c829ec444e3be6e699ade8481b6
3733+
checksum/config: 20facf53caa00bcd92c0756c1f7ea86b9788ec46f66519a482ac468e86ba7f70
37303734
labels:
37313735
app: antrea
37323736
component: antrea-controller

build/yamls/antrea-eks.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ data:
270270
# Defaults to transport interface if not set.
271271
multicastInterfaces:
272272
273+
# The interval for antrea-agent to send IGMP query to pods, time uint is second.
274+
# Defaults to 125 seconds.
275+
igmpQueryInterval: 125
276+
273277
# The network CIDRs of the interface on Node which is used for tunneling or routing the traffic across
274278
# Nodes. If there are multiple interfaces configured the same network CIDR, the first one is used. The
275279
# IP address used for tunneling or routing traffic to remote Nodes is decided in the following order of
@@ -3486,7 +3490,7 @@ spec:
34863490
kubectl.kubernetes.io/default-container: antrea-agent
34873491
# Automatically restart Pods with a RollingUpdate if the ConfigMap changes
34883492
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
3489-
checksum/config: 4554a36b927c6e64fdbc53b4d4c64673d48c9c829ec444e3be6e699ade8481b6
3493+
checksum/config: 20facf53caa00bcd92c0756c1f7ea86b9788ec46f66519a482ac468e86ba7f70
34903494
labels:
34913495
app: antrea
34923496
component: antrea-agent
@@ -3728,7 +3732,7 @@ spec:
37283732
annotations:
37293733
# Automatically restart Pod if the ConfigMap changes
37303734
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
3731-
checksum/config: 4554a36b927c6e64fdbc53b4d4c64673d48c9c829ec444e3be6e699ade8481b6
3735+
checksum/config: 20facf53caa00bcd92c0756c1f7ea86b9788ec46f66519a482ac468e86ba7f70
37323736
labels:
37333737
app: antrea
37343738
component: antrea-controller

build/yamls/antrea-gke.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ data:
270270
# Defaults to transport interface if not set.
271271
multicastInterfaces:
272272
273+
# The interval for antrea-agent to send IGMP query to pods, time uint is second.
274+
# Defaults to 125 seconds.
275+
igmpQueryInterval: 125
276+
273277
# The network CIDRs of the interface on Node which is used for tunneling or routing the traffic across
274278
# Nodes. If there are multiple interfaces configured the same network CIDR, the first one is used. The
275279
# IP address used for tunneling or routing traffic to remote Nodes is decided in the following order of
@@ -3486,7 +3490,7 @@ spec:
34863490
kubectl.kubernetes.io/default-container: antrea-agent
34873491
# Automatically restart Pods with a RollingUpdate if the ConfigMap changes
34883492
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
3489-
checksum/config: edef4c00e4f28a10dc1e077086ef68641a9a3b53d0fe7d47ff3dafc2ce5d5c9b
3493+
checksum/config: 2fc5286dcb73c16d939a6cd67143f2ab86b895127e0806ec036b27231130a217
34903494
labels:
34913495
app: antrea
34923496
component: antrea-agent
@@ -3726,7 +3730,7 @@ spec:
37263730
annotations:
37273731
# Automatically restart Pod if the ConfigMap changes
37283732
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
3729-
checksum/config: edef4c00e4f28a10dc1e077086ef68641a9a3b53d0fe7d47ff3dafc2ce5d5c9b
3733+
checksum/config: 2fc5286dcb73c16d939a6cd67143f2ab86b895127e0806ec036b27231130a217
37303734
labels:
37313735
app: antrea
37323736
component: antrea-controller

build/yamls/antrea-ipsec.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ data:
283283
# Defaults to transport interface if not set.
284284
multicastInterfaces:
285285
286+
# The interval for antrea-agent to send IGMP query to pods, time uint is second.
287+
# Defaults to 125 seconds.
288+
igmpQueryInterval: 125
289+
286290
# The network CIDRs of the interface on Node which is used for tunneling or routing the traffic across
287291
# Nodes. If there are multiple interfaces configured the same network CIDR, the first one is used. The
288292
# IP address used for tunneling or routing traffic to remote Nodes is decided in the following order of
@@ -3499,7 +3503,7 @@ spec:
34993503
kubectl.kubernetes.io/default-container: antrea-agent
35003504
# Automatically restart Pods with a RollingUpdate if the ConfigMap changes
35013505
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
3502-
checksum/config: 50cc962db93c0354f5eaa088e51d690e779692979cbafac0c3e27a88fc2c0c7c
3506+
checksum/config: 9246c1868a5f1847e24fe1bf84cad2c05dc020dd6e4480b65bf9bfb5dd58f54b
35033507
checksum/ipsec-secret: d0eb9c52d0cd4311b6d252a951126bf9bea27ec05590bed8a394f0f792dcb2a4
35043508
labels:
35053509
app: antrea
@@ -3775,7 +3779,7 @@ spec:
37753779
annotations:
37763780
# Automatically restart Pod if the ConfigMap changes
37773781
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
3778-
checksum/config: 50cc962db93c0354f5eaa088e51d690e779692979cbafac0c3e27a88fc2c0c7c
3782+
checksum/config: 9246c1868a5f1847e24fe1bf84cad2c05dc020dd6e4480b65bf9bfb5dd58f54b
37793783
labels:
37803784
app: antrea
37813785
component: antrea-controller

build/yamls/antrea.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ data:
270270
# Defaults to transport interface if not set.
271271
multicastInterfaces:
272272
273+
# The interval for antrea-agent to send IGMP query to pods, time uint is second.
274+
# Defaults to 125 seconds.
275+
igmpQueryInterval: 125
276+
273277
# The network CIDRs of the interface on Node which is used for tunneling or routing the traffic across
274278
# Nodes. If there are multiple interfaces configured the same network CIDR, the first one is used. The
275279
# IP address used for tunneling or routing traffic to remote Nodes is decided in the following order of
@@ -3486,7 +3490,7 @@ spec:
34863490
kubectl.kubernetes.io/default-container: antrea-agent
34873491
# Automatically restart Pods with a RollingUpdate if the ConfigMap changes
34883492
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
3489-
checksum/config: f7414e9171ab246b09dc380bc7934ebac81af7a5ef7bd3f73d661b6301040768
3493+
checksum/config: 842778dc6a141b7868ad1dba2bc680e78ce5a5473db6c589334c88b1ec91181b
34903494
labels:
34913495
app: antrea
34923496
component: antrea-agent
@@ -3726,7 +3730,7 @@ spec:
37263730
annotations:
37273731
# Automatically restart Pod if the ConfigMap changes
37283732
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
3729-
checksum/config: f7414e9171ab246b09dc380bc7934ebac81af7a5ef7bd3f73d661b6301040768
3733+
checksum/config: 842778dc6a141b7868ad1dba2bc680e78ce5a5473db6c589334c88b1ec91181b
37303734
labels:
37313735
app: antrea
37323736
component: antrea-controller

cmd/antrea-agent/agent.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,8 @@ func run(o *Options) error {
591591
multicastSocket,
592592
sets.NewString(append(o.config.MulticastInterfaces, nodeConfig.NodeTransportInterfaceName)...),
593593
ovsBridgeClient,
594-
podUpdateChannel)
594+
podUpdateChannel,
595+
o.igmpQueryInterval)
595596
if err := mcastController.Initialize(); err != nil {
596597
return err
597598
}

cmd/antrea-agent/options.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const (
4747
defaultFlowPollInterval = 5 * time.Second
4848
defaultActiveFlowExportTimeout = 30 * time.Second
4949
defaultIdleFlowExportTimeout = 15 * time.Second
50+
defaultIGMPQueryInterval = 125 * time.Second
5051
defaultStaleConnectionTimeout = 5 * time.Minute
5152
defaultNPLPortRange = "61000-62000"
5253
)
@@ -68,8 +69,10 @@ type Options struct {
6869
idleFlowTimeout time.Duration
6970
// Stale connection timeout to delete connections if they are not exported.
7071
staleConnectionTimeout time.Duration
71-
nplStartPort int
72-
nplEndPort int
72+
// IGMP query interval
73+
igmpQueryInterval time.Duration
74+
nplStartPort int
75+
nplEndPort int
7376
}
7477

7578
func newOptions() *Options {
@@ -271,6 +274,14 @@ func (o *Options) setDefaults() {
271274
o.config.NodePortLocal.PortRange = defaultNPLPortRange
272275
}
273276
}
277+
278+
if features.DefaultFeatureGate.Enabled(features.Multicast) {
279+
if o.config.IGMPQueryInterval == 0 {
280+
o.igmpQueryInterval = defaultIGMPQueryInterval
281+
} else {
282+
o.igmpQueryInterval = o.igmpQueryInterval * time.Second
283+
}
284+
}
274285
}
275286

276287
func (o *Options) validateAntreaProxyConfig() error {

0 commit comments

Comments
 (0)