Skip to content

Commit 2146839

Browse files
committed
Merge tag 'v1.32.5' into bump-4.19-1.32.5
Kubernetes official release v1.32.5
2 parents 375cd1b + 9894294 commit 2146839

File tree

13 files changed

+351
-120
lines changed

13 files changed

+351
-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_test.go

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ func TestNodeExpander(t *testing.T) {
128128
expectedStatusSize: resource.MustParse("2G"),
129129
},
130130
{
131+
<<<<<<< HEAD
131132
name: "RWX volumes, pv.spec.cap = pvc.status.cap, resizeStatus='', desiredSize > actualSize",
132133
pvc: addAccessMode(getTestPVC("test-vol0", "2G", "2G", "2G", nil), v1.ReadWriteMany),
133134
pv: getTestPV("test-vol0", "2G"),
@@ -156,13 +157,46 @@ func TestNodeExpander(t *testing.T) {
156157
pvc: getTestPVC("test-vol0", "2G", "1G", "2G", &nodeResizePending),
157158
pv: getTestPV("test-vol0", "2G"),
158159
recoverVolumeExpansionFailure: false,
160+
||||||| 59526cd4867
161+
name: "RWX volumes, pv.spec.cap = pvc.status.cap, resizeStatus='', desiredSize > actualSize",
162+
pvc: addAccessMode(getTestPVC("test-vol0", "2G", "2G", "2G", nil), v1.ReadWriteMany),
163+
pv: getTestPV("test-vol0", "2G"),
164+
=======
165+
name: "RWX volumes, pv.spec.cap = pvc.status.cap, resizeStatus='', desiredSize > actualSize",
166+
pvc: addAccessMode(getTestPVC("test-vol0", "2G", "2G", "2G", nil), v1.ReadWriteMany),
167+
pv: getTestPV("test-vol0", "2G"),
168+
recoverVolumeExpansionFailure: true,
169+
>>>>>>> v1.32.5
159170

160171
expectedResizeStatus: "",
161172
expectResizeCall: true,
162173
assumeResizeOpAsFinished: true,
163174
expectFinalErrors: false,
164175
expectedStatusSize: resource.MustParse("2G"),
165176
},
177+
{
178+
name: "pv.spec.cap > pvc.status.cap, resizeStatus=node_expansion_pending, featuregate=disabled",
179+
pvc: getTestPVC("test-vol0", "2G", "1G", "2G", &nodeResizePending),
180+
pv: getTestPV("test-vol0", "2G"),
181+
recoverVolumeExpansionFailure: false,
182+
183+
expectedResizeStatus: "",
184+
expectResizeCall: true,
185+
assumeResizeOpAsFinished: true,
186+
expectFinalErrors: false,
187+
expectedStatusSize: resource.MustParse("2G"),
188+
},
189+
{
190+
name: "RWX pv.spec.cap = pvc.status.cap, resizeStatus='', desiredSize > actualSize, reize_op=unsupported",
191+
pvc: addAccessMode(getTestPVC(volumetesting.FailWithUnSupportedVolumeName, "2G", "2G", "2G", nil), v1.ReadWriteMany),
192+
pv: getTestPV(volumetesting.FailWithUnSupportedVolumeName, "2G"),
193+
expectError: false,
194+
expectedResizeStatus: "",
195+
expectResizeCall: false,
196+
assumeResizeOpAsFinished: true,
197+
expectFinalErrors: false,
198+
expectedStatusSize: resource.MustParse("2G"),
199+
},
166200
}
167201

168202
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)