Commit Graph

120484 Commits

Author SHA1 Message Date
Paco Xu
3c86d21316 bump klog to v2.120.0 2024-01-11 17:35:07 +08:00
Kubernetes Prow Robot
c9158e9a19
Merge pull request #122595 from dims/support-building-with-and-without-cloud-providers
KUBE_PROVIDERLESS - Support building with and without cloud providers
2024-01-11 05:42:23 +01:00
Kubernetes Prow Robot
741fd84d15
Merge pull request #122689 from enj/enj/r/ec_hash_cleanup
Clean up encryption config reading and hashing logic
2024-01-10 21:58:17 +01:00
Monis Khan
9387a66c71
Clean up encryption config reading and hashing logic
This is a no-op change that makes the internal encryption config
hash more specific to it use and explicitly marks it as unstable.

Signed-off-by: Monis Khan <mok@microsoft.com>
2024-01-10 14:52:12 -05:00
Kubernetes Prow Robot
0341e8294a
Merge pull request #122555 from p0lyn0mial/upstream-client-go-fg-provider-with-types
client-go/features: introduce feature gates
2024-01-10 20:49:12 +01:00
Lukasz Szaszkiewicz
04bbd3481f client-go/features: warn when ordering initialization issue
ReplaceFeatureGates logs a warning when the default env var
implementation has been already used.
Such a situation indicates a potential ordering issue and usually is unwanted.
2024-01-10 17:24:55 +01:00
Lukasz Szaszkiewicz
d74c57d4f5 client-go/features: introduce feature gates
This PR add a feature gates mechanisim to client-go
as described in https://docs.google.com/document/d/1g9BGCRw-7ucUxO6OtCWbb3lfzUGA_uU9178wLdXAIfs

In particular:
  - Adds a default feature gate implementation based on environment variables.
  - Adds a set of methods for reading, overwriting the default implementation, and adding features to an external registry.

Co-authored-by: deads2k <deads@redhat.com>
Co-authored-by: Ben Luddy <bluddy@redhat.com>
2024-01-10 17:20:40 +01:00
Kubernetes Prow Robot
35bed806dc
Merge pull request #121956 from rewanthtammana/patch-1
Fixed `remotePath` in mount_windows.go
2024-01-10 17:08:08 +01:00
Kubernetes Prow Robot
7dca023859
Merge pull request #122684 from soltysh/improve_output
Add missing string formatting directive
2024-01-10 15:59:26 +01:00
Kubernetes Prow Robot
6e614b0e3f
Merge pull request #122683 from soltysh/fix_validatingadmissionpolicies
Use v1beta1 endpoints when cleaning up ValidatingAdmissionPolicies
2024-01-10 15:59:08 +01:00
Kubernetes Prow Robot
fc691e8ffd
Merge pull request #122476 from kerthcet/feat/support-annotation
Support annotation in nodewrapper
2024-01-10 14:05:58 +01:00
Maciej Szulik
70e20b58dd
Add missing string formatting directive 2024-01-10 13:28:02 +01:00
Maciej Szulik
8abe5394ac
Use v1beta1 endpoints when cleaning up ValidatingAdmissionPolicies 2024-01-10 13:20:27 +01:00
Kubernetes Prow Robot
331e5561ab
Merge pull request #122642 from my-git9/componentconfigs-ut-q
kubeadm: increase ut coverage app/componentconfigs
2024-01-10 02:47:06 +01:00
Kubernetes Prow Robot
c74cd5fec4
Merge pull request #122524 from AxeZhan/testPQupdate
[Scheduler] refactor TestPriorityQueue_Update
2024-01-10 02:46:59 +01:00
Kubernetes Prow Robot
95a159299b
Merge pull request #122614 from tnqn/nftables-firewall
kube-proxy: fix LoadBalancerSourceRanges not working for nftables mode
2024-01-09 22:27:16 +01:00
Kubernetes Prow Robot
1cfe76a8e4
Merge pull request #122583 from jsafrane/fix-selinux-e2e
Fix SELinux e2e tests: add label to observed metrics
2024-01-09 22:27:07 +01:00
Davanum Srinivas
ce263d8828
Address comments during Review
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-01-09 15:52:16 -05:00
Kubernetes Prow Robot
13fad117aa
Merge pull request #122630 from uablrek/kube-proxy-ip-types
Kube-proxy: use type net.IP for addresses
2024-01-09 21:18:25 +01:00
Kubernetes Prow Robot
ccb1d08162
Merge pull request #121834 from vaibhav2107/eviction-update
Added Imagefs inodes in default Eviction Hard
2024-01-09 21:18:16 +01:00
Kubernetes Prow Robot
4c82da4d9f
Merge pull request #122655 from uablrek/cleanup-cidrs
kube-proxy: don't use invalid cidrs in unit test
2024-01-09 19:36:16 +01:00
Kubernetes Prow Robot
56ecdadd99
Merge pull request #122574 from brianpursley/kubectl-1532
Fix kubectl drain error handling bug.
2024-01-09 17:40:17 +01:00
xin.li
1a69fd4cb0 kubeadm: increase ut coverage app/componentconfigs
Signed-off-by: xin.li <xin.li@daocloud.io>
2024-01-09 21:52:11 +08:00
Quan Tian
f21f8d9984 kube-proxy: fix LoadBalancerSourceRanges not working for nftables mode
Previously, the firewall-check chain was run in input, forward, and
output hook but not prerouting hook. When the LoadBalancer traffic
arrived at input or forward hook, it had been DNATed to endpoint IP and
port, so the firewall-check chain didn't take effect, traffic from out
of LoadBalancerSourceRanges was not dropped.

It was not detected by unit test because the chains were sorted by
priority only, while hook should be taken into consideration.

The commit links the firewall-check chain to prerouting hook and unlinks
it from input and forward hook to ensure the traffic is filtered before
DNAT. The priorities of filter chains are updated from "DNATPriority-1"
to "DNATPriority-10" to allow third parties to insert something else
between them.

Signed-off-by: Quan Tian <qtian@vmware.com>
2024-01-09 17:34:16 +08:00
Lars Ekman
50b3ffc71f kube-proxy: LoadBalancerSourceRanges as *net.IPNet 2024-01-09 09:17:56 +01:00
Lars Ekman
9eac24c656 kube-proxy: store ExternalIPs as net.IP
They were stored as strings which could be non-canonical
and cause problems
2024-01-09 09:17:50 +01:00
Lars Ekman
d2294007b0 kube-proxy: store LoadBalancerVIPs as net.IP
They were stored as strings which could be non-canonical
and cause problems
2024-01-09 09:17:43 +01:00
Lars Ekman
564b80b1e1 kube-proxy: don't use invalid cidrs in unit test
CIDRs like 192.168.200.3/24 and fd00:20::1/64 replaced with
192.168.200.0/24 and fd00:20::/64
2024-01-09 09:17:31 +01:00
Lars Ekman
41ba76d23e kube-proxy: don't use invalid cidrs in unit test
CIDRs like 192.168.200.3/24 and fd00:20::1/64 replaced with
192.168.200.0/24 and fd00:20::/64
2024-01-09 09:14:20 +01:00
Kubernetes Prow Robot
85097f3d2c
Merge pull request #122652 from AkihiroSuda/fix-122650
Fix compiling e2e.test on macOS
2024-01-09 03:56:30 +01:00
Akihiro Suda
2e999fff02
Fix compiling e2e.test on macOS
Fix issue 122650 (regression in PR 122552)

```
$ make WHAT=test/e2e/e2e.test
+++ [0109 10:06:53] Building go targets for darwin/amd64
    k8s.io/kubernetes/test/e2e/e2e.test (test)
package k8s.io/kubernetes/test/e2e
        imports k8s.io/kubernetes/test/e2e/common
        imports k8s.io/kubernetes/test/e2e/common/node
        imports k8s.io/kubernetes/pkg/kubelet
        imports github.com/opencontainers/runc/libcontainer/userns: C source files not allowed when not using cgo or SWIG: userns_maps.c
!!! [0109 10:06:54] Call tree:
!!! [0109 10:06:54]  1: /Users/suda/gopath/src/k8s.io/kubernetes/hack/lib/golang.sh:948 kube::golang::build_binaries_for_platform(...)
!!! [0109 10:06:54]  2: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0109 10:06:54] Call tree:
!!! [0109 10:06:54]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0109 10:06:54] Call tree:
!!! [0109 10:06:54]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
make: *** [all] Error 1
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-09 10:42:20 +09:00
Kubernetes Prow Robot
9e0eccabb4
Merge pull request #119968 from j4ckstraw/replace-stat-with-statx
Replace stat syscall with statx
2024-01-08 21:17:03 +01:00
Kubernetes Prow Robot
627416325c
Merge pull request #122552 from yankay/runc/update-to-1.1.11
Bump runc to v1.1.11
2024-01-08 18:37:47 +01:00
Kubernetes Prow Robot
2cf7465755
Merge pull request #122605 from tnqn/stale-chain-cleanup
kube-proxy: do not delete previously stale but currently active chains
2024-01-08 17:30:53 +01:00
Kubernetes Prow Robot
919d4624a0
Merge pull request #122503 from sunbinnnnn/scheduler-extender-support-ignore-bind
Support ignore scheduler extender error when binding
2024-01-08 17:30:44 +01:00
Kubernetes Prow Robot
5b979a3a53
Merge pull request #122498 from Gekko0114/close
Allow framework plugins to be closed
2024-01-08 17:30:36 +01:00
Kubernetes Prow Robot
f538feed8c
Merge pull request #122296 from tnqn/nftables-kernel-requirement
kube-proxy: change implementation of LoadBalancerSourceRanges for wider kernel support
2024-01-08 17:30:27 +01:00
Ziqi Zhao
6b5e973e5f
Migrate cmd/kube-proxy to contextual logging (#122197)
* cmd/kube-proxy support contextual logging

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* use ktesting.NewTestContext(t) in unit test

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* use ktesting.NewTestContext(t) in unit test

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* remove unnecessary blank line & add cmd/kube-proxy to contextual section in logcheck.conf

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* add more contextual logging

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* new lint yaml

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

---------

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2024-01-08 17:30:18 +01:00
Kubernetes Prow Robot
c8a718bb87
Merge pull request #121916 from carlory/issue-121892
E2E - Sig-autoscaling: Refactor the Autoscaling utils
2024-01-08 17:30:08 +01:00
Kubernetes Prow Robot
000abc279e
Merge pull request #122645 from aojea/cleanup_ipma
remove dead code
2024-01-08 16:26:37 +01:00
Kubernetes Prow Robot
29db677ad0
Merge pull request #121734 from Peac36/fix/121613
add test for the registered feature gates
2024-01-08 16:26:28 +01:00
Kubernetes Prow Robot
4142dda1e9
Merge pull request #122643 from soltysh/never_terminate
Add a new neverTerminate job behavior just for upgrade
2024-01-08 14:54:13 +01:00
Antonio Ojea
e46778a246 remove dead code
Change-Id: I8e1fd101ecb32436d82363c76fa84c476b171d52
2024-01-08 13:15:28 +00:00
Neil Sun
87816ffb2c Support ignore scheduler extender error when binding
Signed-off-by: sunbinnnnn <sunbinnnnn@hotmail.com>
2024-01-08 21:06:25 +08:00
Maciej Szulik
f8abe71238
Add an post-upgrade condition to ensure the job is running 2024-01-08 13:52:03 +01:00
Maciej Szulik
67cf648ab7
Add a new neverTerminate job behavior just for upgrade 2024-01-08 13:51:08 +01:00
Davanum Srinivas
b7012da2ad
Remove providerless tag in controller_test.go
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-01-08 07:03:49 -05:00
Quan Tian
377f521038 kube-proxy: change implementation of LoadBalancerSourceRanges for wider kernel support
The nftables implementation made use of concatenation of ranges when
creating the set "firewall-allow", but the support was not available
before kernel 5.6. Therefore, nftables mode couldn't run on earlier
kernels, while 5.4 is still widely used.

An alternative of concatenation of ranges is to create a separate
firewall chain for every service port that needs firewalling, and jump
to the service's firewall chain from the common firewall chain via a
rule with vmap.

Renaming from "firewall" to "firewall-ips" is required when changing the
set to the map to support existing clusters to upgrade, otherwise it
would fail to create the map. Besides, "firewall-ips" corresponds to the
"service-ips" map, later we can add use "firewall-nodeports" if it's
determined that NodePort traffic should be subject to
LoadBalancerSourceRanges.

Signed-off-by: Quan Tian <qtian@vmware.com>
2024-01-08 19:26:38 +08:00
Quan Tian
ca8c27c480 kube-proxy: do not delete previously stale but currently active chains
In some cases a chain could change from stale to active, but once it's
added to staleChains it would always be deleted once. When the proxier
tries to delete a previously stale but currently active chain, it would
fail and lead to errors, though it won't cause real problem thanks to
kernel's validation.

The commit removes a chain from staleChains if it becomes active.

Signed-off-by: Quan Tian <qtian@vmware.com>
2024-01-08 17:53:52 +08:00
Kubernetes Prow Robot
18608cc56b
Merge pull request #122619 from neolit123/1.30-v1beta4-control-reset-unmount
kubeadm: skip unmount on missing /var/lib/kubelet
2024-01-08 08:47:41 +01:00