Skip to content

Commit 47ca663

Browse files
committed
Merge tag 'v1.32.5' into bump-4.19-1.32.5
Kubernetes official release v1.32.5
2 parents 9fe7dfd + 9894294 commit 47ca663

File tree

14 files changed

+348
-120
lines changed

14 files changed

+348
-120
lines changed

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.23.6
1+
1.23.8

CHANGELOG/CHANGELOG-1.32.md

Lines changed: 176 additions & 75 deletions
Large diffs are not rendered by default.

build/build-image/cross/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.32.0-go1.23.6-bullseye.0
1+
v1.32.0-go1.23.8-bullseye.0

build/common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ readonly KUBE_RSYNC_PORT="${KUBE_RSYNC_PORT:-}"
9797
readonly KUBE_CONTAINER_RSYNC_PORT=8730
9898

9999
# These are the default versions (image tags) for their respective base images.
100-
readonly __default_distroless_iptables_version=v0.6.8
101-
readonly __default_go_runner_version=v2.4.0-go1.23.6-bookworm.0
100+
readonly __default_distroless_iptables_version=v0.6.9
101+
readonly __default_go_runner_version=v2.4.0-go1.23.8-bookworm.0
102102
readonly __default_setcap_version=bookworm-v1.0.4
103103

104104
# These are the base images for the Docker-wrapped binaries.

build/dependencies.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ dependencies:
116116

117117
# Golang
118118
- name: "golang: upstream version"
119-
version: 1.23.6
119+
version: 1.23.8
120120
refPaths:
121121
- path: .go-version
122122
- path: build/build-image/cross/VERSION
@@ -140,7 +140,7 @@ dependencies:
140140
match: golang:([0-9]+\.[0-9]+).0-bullseye
141141

142142
- name: "registry.k8s.io/kube-cross: dependents"
143-
version: v1.32.0-go1.23.6-bullseye.0
143+
version: v1.32.0-go1.23.8-bullseye.0
144144
refPaths:
145145
- path: build/build-image/cross/VERSION
146146

@@ -178,15 +178,15 @@ dependencies:
178178
match: registry\.k8s\.io\/build-image\/debian-base:[a-zA-Z]+\-v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)
179179

180180
- name: "registry.k8s.io/distroless-iptables: dependents"
181-
version: v0.6.8
181+
version: v0.6.9
182182
refPaths:
183183
- path: build/common.sh
184184
match: __default_distroless_iptables_version=
185185
- path: test/utils/image/manifest.go
186186
match: configs\[DistrolessIptables\] = Config{list\.BuildImageRegistry, "distroless-iptables", "v([0-9]+)\.([0-9]+)\.([0-9]+)"}
187187

188188
- name: "registry.k8s.io/go-runner: dependents"
189-
version: v2.4.0-go1.23.6-bookworm.0
189+
version: v2.4.0-go1.23.8-bookworm.0
190190
refPaths:
191191
- path: build/common.sh
192192
match: __default_go_runner_version=

pkg/proxy/winkernel/hns.go

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -133,40 +133,43 @@ func (hns hns) getAllEndpointsByNetwork(networkName string) (map[string]*(endpoi
133133
continue
134134
}
135135

136-
// Add to map with key endpoint ID or IP address
137-
// Storing this is expensive in terms of memory, however there is a bug in Windows Server 2019 that can cause two endpoints to be created with the same IP address.
138-
// TODO: Store by IP only and remove any lookups by endpoint ID.
139-
endpointInfos[ep.Id] = &endpointInfo{
140-
ip: ep.IpConfigurations[0].IpAddress,
141-
isLocal: uint32(ep.Flags&hcn.EndpointFlagsRemoteEndpoint) == 0,
142-
macAddress: ep.MacAddress,
143-
hnsID: ep.Id,
144-
hns: hns,
145-
// only ready and not terminating endpoints were added to HNS
146-
ready: true,
147-
serving: true,
148-
terminating: false,
149-
}
150-
endpointInfos[ep.IpConfigurations[0].IpAddress] = endpointInfos[ep.Id]
136+
for index, ipConfig := range ep.IpConfigurations {
137+
138+
if index > 1 {
139+
// Expecting only ipv4 and ipv6 ipaddresses
140+
// This is highly unlikely to happen, but if it does, we should log a warning
141+
// and break out of the loop
142+
klog.Warning("Endpoint ipconfiguration holds more than 2 IP addresses.", "hnsID", ep.Id, "IP", ipConfig.IpAddress, "ipConfigCount", len(ep.IpConfigurations))
143+
break
144+
}
151145

152-
if len(ep.IpConfigurations) == 1 {
153-
continue
154-
}
146+
isLocal := uint32(ep.Flags&hcn.EndpointFlagsRemoteEndpoint) == 0
155147

156-
// If ipFamilyPolicy is RequireDualStack or PreferDualStack, then there will be 2 IPS (iPV4 and IPV6)
157-
// in the endpoint list
158-
endpointDualstack := &endpointInfo{
159-
ip: ep.IpConfigurations[1].IpAddress,
160-
isLocal: uint32(ep.Flags&hcn.EndpointFlagsRemoteEndpoint) == 0,
161-
macAddress: ep.MacAddress,
162-
hnsID: ep.Id,
163-
hns: hns,
164-
// only ready and not terminating endpoints were added to HNS
165-
ready: true,
166-
serving: true,
167-
terminating: false,
148+
if existingEp, ok := endpointInfos[ipConfig.IpAddress]; ok && isLocal {
149+
// If the endpoint is already part of the queried endpoints map and is local,
150+
// then we should not add it again to the map
151+
// This is to avoid overwriting the remote endpoint info with a local endpoint.
152+
klog.V(3).InfoS("Endpoint already exists in queried endpoints map; skipping.", "newLocalEndpoint", ep, "ipConfig", ipConfig, "existingEndpoint", existingEp)
153+
continue
154+
}
155+
156+
// Add to map with key endpoint ID or IP address
157+
// Storing this is expensive in terms of memory, however there is a bug in Windows Server 2019 and 2022 that can cause two endpoints (local and remote) to be created with the same IP address.
158+
// TODO: Store by IP only and remove any lookups by endpoint ID.
159+
epInfo := &endpointInfo{
160+
ip: ipConfig.IpAddress,
161+
isLocal: isLocal,
162+
macAddress: ep.MacAddress,
163+
hnsID: ep.Id,
164+
hns: hns,
165+
// only ready and not terminating endpoints were added to HNS
166+
ready: true,
167+
serving: true,
168+
terminating: false,
169+
}
170+
endpointInfos[ep.Id] = epInfo
171+
endpointInfos[ipConfig.IpAddress] = epInfo
168172
}
169-
endpointInfos[ep.IpConfigurations[1].IpAddress] = endpointDualstack
170173
}
171174
klog.V(3).InfoS("Queried endpoints from network", "network", networkName)
172175
klog.V(5).InfoS("Queried endpoints details", "network", networkName, "endpointInfos", endpointInfos)

pkg/proxy/winkernel/hns_test.go

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,70 @@ func TestGetAllEndpointsByNetwork(t *testing.T) {
114114
}
115115
}
116116

117+
func TestGetAllEndpointsByNetworkWithDupEP(t *testing.T) {
118+
hcnMock := getHcnMock("L2Bridge")
119+
hns := hns{hcn: hcnMock}
120+
121+
ipv4Config := &hcn.IpConfig{
122+
IpAddress: epIpAddress,
123+
}
124+
ipv6Config := &hcn.IpConfig{
125+
IpAddress: epIpv6Address,
126+
}
127+
remoteEndpoint := &hcn.HostComputeEndpoint{
128+
IpConfigurations: []hcn.IpConfig{*ipv4Config, *ipv6Config},
129+
MacAddress: epMacAddress,
130+
SchemaVersion: hcn.SchemaVersion{
131+
Major: 2,
132+
Minor: 0,
133+
},
134+
Flags: hcn.EndpointFlagsRemoteEndpoint,
135+
}
136+
Network, _ := hcnMock.GetNetworkByName(testNetwork)
137+
remoteEndpoint, err := hns.hcn.CreateEndpoint(Network, remoteEndpoint)
138+
if err != nil {
139+
t.Error(err)
140+
}
141+
142+
// Create a duplicate local endpoint with the same IP address
143+
dupLocalEndpoint := &hcn.HostComputeEndpoint{
144+
IpConfigurations: []hcn.IpConfig{*ipv4Config, *ipv6Config},
145+
MacAddress: epMacAddress,
146+
SchemaVersion: hcn.SchemaVersion{
147+
Major: 2,
148+
Minor: 0,
149+
},
150+
}
151+
152+
dupLocalEndpoint, err = hns.hcn.CreateEndpoint(Network, dupLocalEndpoint)
153+
if err != nil {
154+
t.Error(err)
155+
}
156+
157+
mapEndpointsInfo, err := hns.getAllEndpointsByNetwork(Network.Name)
158+
if err != nil {
159+
t.Error(err)
160+
}
161+
endpointIpv4, ipv4EpPresent := mapEndpointsInfo[ipv4Config.IpAddress]
162+
assert.True(t, ipv4EpPresent, "IPV4 endpoint is missing in Dualstack mode")
163+
assert.Equal(t, endpointIpv4.ip, epIpAddress, "IPV4 IP is missing in Dualstack mode")
164+
assert.Equal(t, endpointIpv4.hnsID, remoteEndpoint.Id, "HNS ID is not matching with remote endpoint")
165+
166+
endpointIpv6, ipv6EpPresent := mapEndpointsInfo[ipv6Config.IpAddress]
167+
assert.True(t, ipv6EpPresent, "IPV6 endpoint is missing in Dualstack mode")
168+
assert.Equal(t, endpointIpv6.ip, epIpv6Address, "IPV6 IP is missing in Dualstack mode")
169+
assert.Equal(t, endpointIpv6.hnsID, remoteEndpoint.Id, "HNS ID is not matching with remote endpoint")
170+
171+
err = hns.hcn.DeleteEndpoint(remoteEndpoint)
172+
if err != nil {
173+
t.Error(err)
174+
}
175+
err = hns.hcn.DeleteEndpoint(dupLocalEndpoint)
176+
if err != nil {
177+
t.Error(err)
178+
}
179+
}
180+
117181
func TestGetEndpointByID(t *testing.T) {
118182
// TODO: remove skip once the test has been fixed.
119183
t.Skip("Skipping failing test on Windows.")

pkg/proxy/winkernel/proxier.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,11 @@ func (ep *endpointInfo) DecrementRefCount() {
492492
if !ep.IsLocal() && ep.refCount != nil && *ep.refCount > 0 {
493493
*ep.refCount--
494494
}
495+
refCount := 0
496+
if ep.refCount != nil {
497+
refCount = int(*ep.refCount)
498+
}
499+
klog.V(5).InfoS("Endpoint RefCount after decrement.", "endpointInfo", ep, "refCount", refCount)
495500
}
496501

497502
func (ep *endpointInfo) Cleanup() {
@@ -1709,10 +1714,14 @@ func (proxier *Proxier) syncProxyRules() {
17091714

17101715
// remove stale endpoint refcount entries
17111716
for epIP := range proxier.terminatedEndpoints {
1712-
if epToDelete := queriedEndpoints[epIP]; epToDelete != nil && epToDelete.hnsID != "" {
1717+
klog.V(5).InfoS("Terminated endpoints ready for deletion", "epIP", epIP)
1718+
if epToDelete := queriedEndpoints[epIP]; epToDelete != nil && epToDelete.hnsID != "" && !epToDelete.IsLocal() {
17131719
if refCount := proxier.endPointsRefCount.getRefCount(epToDelete.hnsID); refCount == nil || *refCount == 0 {
1714-
klog.V(3).InfoS("Deleting unreferenced remote endpoint", "hnsID", epToDelete.hnsID)
1715-
proxier.hns.deleteEndpoint(epToDelete.hnsID)
1720+
klog.V(3).InfoS("Deleting unreferenced remote endpoint", "hnsID", epToDelete.hnsID, "IP", epToDelete.ip)
1721+
err := proxier.hns.deleteEndpoint(epToDelete.hnsID)
1722+
if err != nil {
1723+
klog.ErrorS(err, "Deleting unreferenced remote endpoint failed", "hnsID", epToDelete.hnsID)
1724+
}
17161725
}
17171726
}
17181727
}

pkg/proxy/winkernel/proxier_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,26 @@ func NewFakeProxier(syncPeriod time.Duration, minSyncPeriod time.Duration, hostn
129129
return proxier
130130
}
131131

132+
func getHcnMock(networkType string) *fakehcn.HcnMock {
133+
var remoteSubnets []*remoteSubnetInfo
134+
rs := &remoteSubnetInfo{
135+
destinationPrefix: destinationPrefix,
136+
isolationID: 4096,
137+
providerAddress: providerAddress,
138+
drMacAddress: macAddress,
139+
}
140+
remoteSubnets = append(remoteSubnets, rs)
141+
hnsNetworkInfo := &hnsNetworkInfo{
142+
id: strings.ToUpper(guid),
143+
name: testNetwork,
144+
networkType: networkType,
145+
remoteSubnets: remoteSubnets,
146+
}
147+
hnsNetwork := newHnsNetwork(hnsNetworkInfo)
148+
hcnMock := fakehcn.NewHcnMock(hnsNetwork)
149+
return hcnMock
150+
}
151+
132152
func TestCreateServiceVip(t *testing.T) {
133153
syncPeriod := 30 * time.Second
134154
proxier := NewFakeProxier(syncPeriod, syncPeriod, "testhost", netutils.ParseIPSloppy("10.0.0.1"), NETWORK_TYPE_OVERLAY)

pkg/volume/util/operationexecutor/node_expander.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,26 @@ func (ne *NodeExpander) expandOnPlugin() (bool, resource.Quantity, error) {
144144
}
145145
_, resizeErr := ne.volumePlugin.NodeExpand(ne.pluginResizeOpts)
146146
if resizeErr != nil {
147+
// In order to support node volume expansion for RWX volumes on different nodes,
148+
// we bypass the check for VolumeExpansionPendingOnNode state during the pre-check
149+
// and then directly call the NodeExpandVolume method on the plugin.
150+
//
151+
// However, it does not make sense where the csi driver does not support node expansion.
152+
// We should not treat this as a failure. It is a workaround for this issue:
153+
// https://github.com/kubernetes/kubernetes/issues/131381.
154+
//
155+
// For other access modes, we should not hit this state, because we will wait for
156+
// VolumeExpansionPendingOnNode before trying to expand volume in kubelet.
157+
// See runPreCheck() above.
158+
//
159+
// If volume is already expanded, then we should not retry expansion on the node if
160+
// driver returns OperationNotSupportedError.
161+
if volumetypes.IsOperationNotSupportedError(resizeErr) && ne.pvcAlreadyUpdated {
162+
klog.V(4).InfoS(ne.vmt.GenerateMsgDetailed("MountVolume.NodeExpandVolume failed", "NodeExpandVolume not supported"), "pod", klog.KObj(ne.vmt.Pod))
163+
ne.testStatus = testResponseData{assumeResizeFinished: true, resizeCalledOnPlugin: false}
164+
return true, ne.pluginResizeOpts.NewSize, nil
165+
}
166+
147167
if volumetypes.IsOperationFinishedError(resizeErr) {
148168
var markFailedError error
149169
ne.actualStateOfWorld.MarkVolumeExpansionFailedWithFinalError(ne.vmt.VolumeName)

pkg/volume/util/operationexecutor/node_expander_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ func TestNodeExpander(t *testing.T) {
151151
expectFinalErrors: false,
152152
expectedStatusSize: resource.MustParse("2G"),
153153
},
154+
{
155+
name: "RWX pv.spec.cap = pvc.status.cap, resizeStatus='', desiredSize > actualSize, reize_op=unsupported",
156+
pvc: addAccessMode(getTestPVC(volumetesting.FailWithUnSupportedVolumeName, "2G", "2G", "2G", nil), v1.ReadWriteMany),
157+
pv: getTestPV(volumetesting.FailWithUnSupportedVolumeName, "2G"),
158+
expectError: false,
159+
expectedResizeStatus: "",
160+
expectResizeCall: false,
161+
assumeResizeOpAsFinished: true,
162+
expectFinalErrors: false,
163+
expectedStatusSize: resource.MustParse("2G"),
164+
},
154165
}
155166

156167
for i := range tests {

staging/publishing/rules.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2900,4 +2900,4 @@ rules:
29002900
- staging/src/k8s.io/externaljwt
29012901
recursive-delete-patterns:
29022902
- '*/.gitattributes'
2903-
default-go-version: 1.23.6
2903+
default-go-version: 1.23.8

test/images/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ REGISTRY ?= registry.k8s.io/e2e-test-images
1616
GOARM ?= 7
1717
DOCKER_CERT_BASE_PATH ?=
1818
QEMUVERSION=v5.1.0-2
19-
GOLANG_VERSION=1.23.6
19+
GOLANG_VERSION=1.23.8
2020
export
2121

2222
ifndef WHAT

test/utils/image/manifest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func initImageConfigs(list RegistryList) (map[ImageID]Config, map[ImageID]Config
223223
configs[APIServer] = Config{list.PromoterE2eRegistry, "sample-apiserver", "1.29.2"}
224224
configs[AppArmorLoader] = Config{list.PromoterE2eRegistry, "apparmor-loader", "1.4"}
225225
configs[BusyBox] = Config{list.PromoterE2eRegistry, "busybox", "1.36.1-1"}
226-
configs[DistrolessIptables] = Config{list.BuildImageRegistry, "distroless-iptables", "v0.6.8"}
226+
configs[DistrolessIptables] = Config{list.BuildImageRegistry, "distroless-iptables", "v0.6.9"}
227227
configs[Etcd] = Config{list.GcEtcdRegistry, "etcd", "3.5.16-0"}
228228
configs[Httpd] = Config{list.PromoterE2eRegistry, "httpd", "2.4.38-4"}
229229
configs[HttpdNew] = Config{list.PromoterE2eRegistry, "httpd", "2.4.39-4"}

0 commit comments

Comments
 (0)