Commit Graph

128838 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
5227bad0df
Merge pull request #130335 from carlory/fix-handle-terminating-pvc-when-kubelet-rebuild-dsw
Fix kubelet restart unmounts volumes of running pods if the referenced PVC is being deleted by the user
2025-03-10 03:09:47 -07:00
carlory
aab083972d fix handle terminating pvc when kubelet rebuild dsw
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-03-10 15:39:18 +08:00
Paco Xu
ce163947aa fix a flake of TestRoundTripTypes: for FirstAvailable[].AllocationMode 2025-03-10 14:03:55 +08:00
Drew Sirenko
085d23388a Mark VAC roll-forward test as flaky 2025-03-10 00:40:53 -04:00
Gaurav Ghildiyal
dc80618817 Use SetFeatureGateEmulationVersionDuringTest() for testing
ServiceTrafficDistribution feature-flag disablement in control plane components

Ref. https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/feature-gates.md#disablement-tests
2025-03-09 17:02:54 -07:00
Gaurav Ghildiyal
4e317265c7 Remove usage of ServiceTrafficDistribution feature-gate from kube-proxy packages.
ServiceTrafficDistribution feature-gate is GA'd and enabled by default since
1.33. Since it is also locked-to-default, we can remove flag-usages in
kube-proxy.

NOTE that as per
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/feature-gates.md#disablement-tests:
_"Disablement tests are only required to be preserved for components and
libraries that support compatibility version. Tests for node and kubelet are
unaffected by compatibility version."_
2025-03-09 17:02:20 -07:00
Gaurav Ghildiyal
2492eddd20 Bump ServiceTrafficDistribution feature-gate to GA in 1.33 and set LockToDefault=true 2025-03-09 15:16:56 -07:00
Gaurav Ghildiyal
ca43bb1719 Run 'make update' 2025-03-09 14:54:36 -07:00
Gaurav Ghildiyal
0d0b81b937 Update trafficDistribution API spec docs for GA graduation 2025-03-09 14:35:03 -07:00
Kubernetes Prow Robot
0f2bde7745
Merge pull request #130555 from thockin/k_k_randfill
Use randfill in k/k
2025-03-09 01:47:45 -08:00
Tim Hockin
770ce2d874
Better handling of YAML that tastes like JSON
For the most part, JSON is a subset of YAML.  This might lead one to
think that we should ALWAYS use YAML processing.  Unfortunately a JSON
"stream" (as defined by Go's encoding/json and many other places, though
not the JSON spec) is a series of JSON objects.  E.g. This:

```
{}{}{}
```

...is a valid JSON stream.

YAML does NOT accept that, insisting on `---` on a new line between YAML
documents.

Before this commit, YAMLOrJSONDecoder tries to detect if the input is
JSON by looking at the first few characters for "{".  Unfortunately,
some perfectly valid YAML also tastes like that.

After this commit, YAMLOrJSONDecoder will detect a failure to parse as
JSON and instead flip to YAML parsing.  This should handle the ambiguous
YAML.

Once we flip to YAML we never flip back, and once we detect a JSON
stream (as defined above) we lose the ability to flip to YAML.  A
multi-document is either all JSON or all YAML, even if we use the JSON
parser to decode the first object (because JSON is YAML for a single
object).
2025-03-08 15:38:10 -08:00
Tim Hockin
f08e640b9e
Lock down gofuzz in deps 2025-03-08 15:22:01 -08:00
Tim Hockin
0ce4268b1f
Vendor randfill 2025-03-08 15:21:58 -08:00
Kubernetes Prow Robot
6cb457bc66
Merge pull request #130664 from jpbetz/time-in-extra-pkgs
Add time to extra-pkgs for validation-gen
2025-03-08 15:21:44 -08:00
Tim Hockin
e54719bb66
Use randfill, do API renames 2025-03-08 15:18:00 -08:00
Joe Betz
6798e2d863 Add time to extra-pkgs for validation-gen 2025-03-08 14:21:49 -05:00
Dan Winship
8c98dee1ed Add utiliptables.NewDualStack
Basically all callers want dual-stack-if-possible, so simplify that.

Also, tweak the startup-time checking in kubelet to treat "no iptables
support" as interesting but not an error.
2025-03-08 10:14:17 -05:00
Dan Winship
b031258969 Improve utiliptables error handling when there's no iptables binary
If `iptables --version` failed, utiliptables.New() would log a warning
and assume that the problem was that you had an implausibly ancient
version of iptables installed. Change it to instead assume that the
problem is that you don't have iptables installed at all (and don't
log anything; the caller will discover this later).
2025-03-08 10:11:16 -05:00
Dan Winship
f1d0eb4fe4 Add a unit test for utiliptables.New() 2025-03-08 10:11:16 -05:00
Dan Winship
9c98d29795 Remove exec arg from utiliptables.New
It was there so you could mock the results via a FakeExec, but these
days any unit tests outside of pkg/util/iptables that want to mock
iptables results use a FakeIPTables instead of a real
utiliptables.Interface with a FakeExec.
2025-03-08 10:11:15 -05:00
Yuki Iwai
e5e76d7c7c chore: Fix incorrect AppArmorProfile.Type marker
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2025-03-08 15:47:13 +09:00
Kubernetes Prow Robot
0eaee48ecb
Merge pull request #130569 from dims/update-to-latest-cadvisor-v0.52.0
Update to latest cadvisor @ v0.52.1 and new opencontainer/cgroups and drops opencontainers/runc
2025-03-07 17:09:51 -08:00
Kubernetes Prow Robot
1d88598555
Merge pull request #130561 from danwinship/more-misc-proxy-cleanup
more misc proxy cleanup
2025-03-07 17:09:44 -08:00
Kubernetes Prow Robot
6216201e16
Merge pull request #130485 from aramase/aramase/f/using_sar_for_node_aud_restriction
Enable dynamic configuration of service account names and audiences for token requests in node audience restriction
2025-03-07 15:35:45 -08:00
Anish Ramasekar
3f5d30543d
Add integration tests for using SAR with node audience restriction
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-03-07 16:25:18 -06:00
Anish Ramasekar
b09ca8c2c8
Use SAR to allow dynamic audiences for node audience restriction
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-03-07 16:25:14 -06:00
Kubernetes Prow Robot
2effa5e3cf
Merge pull request #130352 from natasha41575/kubelet-pod-observedgen
[FG:PodObservedGenerationTracking] Kubelet sets pod `status.observedGeneration` when updating the pod status
2025-03-07 13:33:45 -08:00
Kubernetes Prow Robot
cd060979bf
Merge pull request #130651 from ahrtr/rc2_20250307
Build etcd v3.6.0-rc.2 image
2025-03-07 12:27:53 -08:00
Kubernetes Prow Robot
83b696c720
Merge pull request #130125 from marosset/windows-unit-tests-kubelet-eviction-fixes
fixing k8s.io/kubernetes/pkg/kubelet/eviction unit tests on Windows
2025-03-07 12:27:46 -08:00
Davanum Srinivas
97a54dc4b0
update to v1.22.0-rc.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-03-07 13:45:34 -05:00
Kubernetes Prow Robot
a6ad9aa8ad
Merge pull request #130623 from marosset/fix-pkg-volume-util-subpath-unit-tests-windows
Fixing unit tests in k8s.io/kubernetes/pkg/volume/util/subpath on Win…
2025-03-07 10:39:48 -08:00
Benjamin Wang
337f1c211d Build etcd v3.6.0-rc.2 image
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-03-07 17:48:47 +00:00
Joe Betz
4146900428 Add normalization support to CEL semver library, enable in base env 2025-03-07 12:33:04 -05:00
Kubernetes Prow Robot
0e2a2afc4c
Merge pull request #130635 from zimnx/fix-websocket-read-error
Return correct error upon websocket message read failure
2025-03-07 08:45:53 -08:00
Kubernetes Prow Robot
ed99f7dec6
Merge pull request #130153 from wongchar/uncore-v1.33
node: cpumanager: prefer-align-cpus-by-uncorecache: add test cases and CPU topologies
2025-03-07 08:45:45 -08:00
Dan Winship
7316d83137 Add warnings to all IP/CIDR-valued fields 2025-03-07 11:00:11 -05:00
Dan Winship
d4c55d06cf Export endpoints, endpointslice, mirroring controller names 2025-03-07 10:52:54 -05:00
Dan Winship
610adebdb7 Add utilvalidation.GetWarningsForIP and .GetWarningsForCIDR
(And port the existing Service warnings to use them.)
2025-03-07 10:44:19 -05:00
Dan Winship
34717000da Split out IP validation functions into their own file
(No code changes.)
2025-03-07 10:44:19 -05:00
Dan Winship
5e067b6781 Minor IP/CIDR validation cleanups/fixups
Remove unnecessary duplicate checks for pod.spec.podIPs /
pod.spec.hostIPs / node.spec.podCIDRs. (A list that is known to
contain exactly 2 values, where one is IPv4 and the other is IPv6,
cannot possibly contain duplicates.)

Fix a bad CIDR in the NetworkPolicy validation tests.

Fix some comment typos.
2025-03-07 10:44:19 -05:00
Dan Winship
b62503dd66 Remove a dead error check in winkernel
The cmd/kube-proxy code never passes nil for the node IP any more.
2025-03-07 10:43:58 -05:00
Dan Winship
f001b3916d Remove a stale comment in metaproxier.go
(NodeHandler was implemented in metaProxier a long time ago.)
2025-03-07 10:43:56 -05:00
Dan Winship
303593cafe Fix some pkg/proxy comments
Remove a bunch of comments that are either inaccurate ("the proxier
can only be tested by e2e tests") or weirdly overspecific about
obvious details ("the proxier will not exit if an iptables call
fails").
2025-03-07 10:43:55 -05:00
Dan Winship
b5e9a8262e Remove exec arg from utilipset.New
Historically it took an exec argument so you could pass a FakeExec to
mock its behavior in unit tests, but it has a fake implementation now
that is much more useful for unit tests than trying to use the real
implementation with a fake exec. (The unit tests still use fake execs,
but they don't need to use a public constructor.) So remove the exec
args from the public constructors.
2025-03-07 10:43:52 -05:00
Dan Winship
36f5820ad1 Remove some unused proxy args/fields
Remove the utilexec.Interface args from the iptables/ipvs constructors
(which have been unused since the conntrack cleanup code was ported to
netlink).

Remove the EventRecorder fields from the iptables/ipvs Proxiers, which
have been unused since we removed the port-opener code in 2022.

Remove the strictARP field from the ipvs Proxier, which has apparently
always been unused (strictARP is only looked at at construct time).
2025-03-07 10:43:45 -05:00
Dan Winship
13f0449e4c Fix up kube-proxy import ordering/organization. 2025-03-07 10:43:43 -05:00
Oleksandr Redko
834a0d92cf hack: fix settings for forbidigo linter 2025-03-07 17:27:03 +02:00
Kubernetes Prow Robot
ea49618a74
Merge pull request #130489 from p0lyn0mial/upstream-fake-client-pass-opts
client-gen/fake: pass ListOptions to Watch method
2025-03-07 07:25:46 -08:00
Joe Betz
c510b93d28 Add tolerant parse option to semver 2025-03-07 10:10:57 -05:00
Kubernetes Prow Robot
4468565250
Merge pull request #130470 from p0lyn0mial/upstream-fake-client-opts-watch
client-go/gentype/fake: sets opts.Watch true
2025-03-07 05:21:52 -08:00