@@ -153,25 +153,47 @@ func (proxier *metaProxier) OnEndpointsSynced() {
153
153
// OnEndpointSliceAdd is called whenever creation of a new endpoint slice object
154
154
// is observed.
155
155
func (proxier * metaProxier ) OnEndpointSliceAdd (endpointSlice * discovery.EndpointSlice ) {
156
- // noop
156
+ switch endpointSlice .AddressType {
157
+ case discovery .AddressTypeIPv4 :
158
+ proxier .ipv4Proxier .OnEndpointSliceAdd (endpointSlice )
159
+ case discovery .AddressTypeIPv6 :
160
+ proxier .ipv6Proxier .OnEndpointSliceAdd (endpointSlice )
161
+ default :
162
+ klog .V (4 ).Infof ("EndpointSlice address type not supported by kube-proxy: %s" , endpointSlice .AddressType )
163
+ }
157
164
}
158
165
159
166
// OnEndpointSliceUpdate is called whenever modification of an existing endpoint
160
167
// slice object is observed.
161
- func (proxier * metaProxier ) OnEndpointSliceUpdate (_ , endpointSlice * discovery.EndpointSlice ) {
162
- //noop
168
+ func (proxier * metaProxier ) OnEndpointSliceUpdate (oldEndpointSlice , newEndpointSlice * discovery.EndpointSlice ) {
169
+ switch newEndpointSlice .AddressType {
170
+ case discovery .AddressTypeIPv4 :
171
+ proxier .ipv4Proxier .OnEndpointSliceUpdate (oldEndpointSlice , newEndpointSlice )
172
+ case discovery .AddressTypeIPv6 :
173
+ proxier .ipv6Proxier .OnEndpointSliceUpdate (oldEndpointSlice , newEndpointSlice )
174
+ default :
175
+ klog .V (4 ).Infof ("EndpointSlice address type not supported by kube-proxy: %s" , newEndpointSlice .AddressType )
176
+ }
163
177
}
164
178
165
179
// OnEndpointSliceDelete is called whenever deletion of an existing endpoint slice
166
180
// object is observed.
167
181
func (proxier * metaProxier ) OnEndpointSliceDelete (endpointSlice * discovery.EndpointSlice ) {
168
- //noop
182
+ switch endpointSlice .AddressType {
183
+ case discovery .AddressTypeIPv4 :
184
+ proxier .ipv4Proxier .OnEndpointSliceDelete (endpointSlice )
185
+ case discovery .AddressTypeIPv6 :
186
+ proxier .ipv6Proxier .OnEndpointSliceDelete (endpointSlice )
187
+ default :
188
+ klog .V (4 ).Infof ("EndpointSlice address type not supported by kube-proxy: %s" , endpointSlice .AddressType )
189
+ }
169
190
}
170
191
171
192
// OnEndpointSlicesSynced is called once all the initial event handlers were
172
193
// called and the state is fully propagated to local cache.
173
194
func (proxier * metaProxier ) OnEndpointSlicesSynced () {
174
- //noop
195
+ proxier .ipv4Proxier .OnEndpointSlicesSynced ()
196
+ proxier .ipv6Proxier .OnEndpointSlicesSynced ()
175
197
}
176
198
177
199
// endpointsIPFamily that returns IPFamily of endpoints or error if
0 commit comments