Skip to content

Commit

Permalink
[Windows] Enable EndpointSlices support on Antrea windows
Browse files Browse the repository at this point in the history
* Enable endpointslices feature in antrea-windows.yml
* Make some endpointslices logs more accurate

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
  • Loading branch information
XinShuYang committed Feb 23, 2022
1 parent 15de4cf commit 7c3d347
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
9 changes: 7 additions & 2 deletions build/yamls/antrea-windows.yml
Expand Up @@ -23,6 +23,11 @@ data:
# Service traffic.
# AntreaProxy: true
# Enable EndpointSlice support in AntreaProxy. Don't enable this feature unless that EndpointSlice
# API version v1beta1 is supported and set as enabled in Kubernetes. If AntreaProxy is not enabled,
# this flag will not take effect.
# EndpointSlice: false
# Enable flowexporter which exports polled conntrack connections as IPFIX flow records from each agent to a configured collector.
# FlowExporter: false
Expand Down Expand Up @@ -144,7 +149,7 @@ kind: ConfigMap
metadata:
labels:
app: antrea
name: antrea-windows-config-25k48fh55f
name: antrea-windows-config-mf82kffb45
namespace: kube-system
---
apiVersion: apps/v1
Expand Down Expand Up @@ -232,7 +237,7 @@ spec:
operator: Exists
volumes:
- configMap:
name: antrea-windows-config-25k48fh55f
name: antrea-windows-config-mf82kffb45
name: antrea-windows-config
- configMap:
defaultMode: 420
Expand Down
5 changes: 5 additions & 0 deletions build/yamls/windows/base/conf/antrea-agent.conf
Expand Up @@ -5,6 +5,11 @@ featureGates:
# Service traffic.
# AntreaProxy: true

# Enable EndpointSlice support in AntreaProxy. Don't enable this feature unless that EndpointSlice
# API version v1beta1 is supported and set as enabled in Kubernetes. If AntreaProxy is not enabled,
# this flag will not take effect.
# EndpointSlice: false

# Enable flowexporter which exports polled conntrack connections as IPFIX flow records from each agent to a configured collector.
# FlowExporter: false

Expand Down
6 changes: 3 additions & 3 deletions third_party/proxy/config/config.go
Expand Up @@ -330,7 +330,7 @@ func (c *EndpointSliceConfig) handleAddEndpointSlice(obj interface{}) {
return
}
for _, h := range c.eventHandlers {
klog.V(4).Infof("Calling handler.OnEndpointSliceAdd %+v", endpointSlice)
klog.V(4).InfoS("Calling handler.OnEndpointSliceAdd", endpointSlice)
h.OnEndpointSliceAdd(endpointSlice)
}
}
Expand All @@ -347,7 +347,7 @@ func (c *EndpointSliceConfig) handleUpdateEndpointSlice(oldObj, newObj interface
return
}
for _, h := range c.eventHandlers {
klog.V(4).Infof("Calling handler.OnEndpointSliceUpdate")
klog.V(4).InfoS("Calling handler.OnEndpointSliceUpdate", "from", oldEndpointSlice, "to", newEndpointSlice)
h.OnEndpointSliceUpdate(oldEndpointSlice, newEndpointSlice)
}
}
Expand All @@ -366,7 +366,7 @@ func (c *EndpointSliceConfig) handleDeleteEndpointSlice(obj interface{}) {
}
}
for _, h := range c.eventHandlers {
klog.V(4).Infof("Calling handler.OnEndpointsDelete")
klog.V(4).InfoS("Calling handler.OnEndpointSliceDelete", endpointSlice)
h.OnEndpointSliceDelete(endpointSlice)
}
}

0 comments on commit 7c3d347

Please sign in to comment.