Commit Graph

12332 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
0344f29e83 Merge pull request #125778 from haitch/haitao/controllermgr-emulatever
add emulated-version flag to kube-controller-manager to control the feature gate.
2024-07-22 20:50:21 -07:00
Haitao Chen
1d92758ef0 implement emulated-version for kube-controller-manager 2024-07-22 16:07:18 -07:00
Kubernetes Prow Robot
581a073dc4 Merge pull request #125663 from saschagrunert/oci-volumesource-kubelet
[KEP-4639] Add `ImageVolumeSource` implementation
2024-07-22 15:48:33 -07:00
Sascha Grunert
979863d15c Add ImageVolumeSource implementation
This patch adds the kubelet implementation of the image volume source
feature.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-07-22 18:46:46 +02:00
Patrick Ohly
b51d68bb87 DRA: bump API v1alpha2 -> v1alpha3
This is in preparation for revamping the resource.k8s.io completely. Because
there will be no support for transitioning from v1alpha2 to v1alpha3, the
roundtrip test data for that API in 1.29 and 1.30 gets removed.

Repeating the version in the import name of the API packages is not really
required. It was done for a while to support simpler grepping for usage of
alpha APIs, but there are better ways for that now. So during this transition,
"resourceapi" gets used instead of "resourcev1alpha3" and the version gets
dropped from informer and lister imports. The advantage is that the next bump
to v1beta1 will affect fewer source code lines.

Only source code where the version really matters (like API registration)
retains the versioned import.
2024-07-21 17:28:13 +02:00
Kubernetes Prow Robot
815efa2baa Merge pull request #126250 from my-git9/pkiutil-consot
kubeadm: remove unused constants in util/pkiutil
2024-07-21 03:02:57 -07:00
Kubernetes Prow Robot
b14769f2af Merge pull request #126224 from neolit123/1.31-fix-bug-in-join-patches-healthz
kubeadm: fix join bug where kubeletconfig was not patched in memory
2024-07-20 14:27:24 -07:00
Lubomir I. Ivanov
b90b280c5a kubeadm: fix join bug where kubeletconfig was not patched in memory
During kubeadm join in 1.30 kubeadm started respecting
the kubeletconfiguration healthz address/port. Previously
it hardcoded the health check to localhost:defaultport.

A corner case was not handled where the user applies --patches
on join to modify the local kubeletconfiguration. This results
in kubeletconfiguration patch target patches not being applied to
the KubeletConfiguration in memory and the health check
running on the address:port which are present in the kubelet-config
configmap.

Fix that by explicitly calling a new function to patch the
KubeletConfiguration in memory. This is scoped to only handle
the healthz checks *after* the kubelet config.yaml was already
patched and written to disk.
2024-07-20 19:31:19 +03:00
xin.li
c1dca0ad7c kubeadm: remove unused constants in util/pkiutil
Signed-off-by: xin.li <xin.li@daocloud.io>
2024-07-20 23:30:25 +08:00
Monis Khan
6a6771b514 svm: set UID and RV on SSA patch to cause conflict on logical create
When a resource gets deleted during migration, the SVM SSA patch
calls are interpreted as a logical create request.  Since the object
from storage is nil, the merged result is just a type meta object,
which lacks a name in the body.  This fails when the API server
checks that the name from the request URL and the body are the same.
Note that a create request is something that SVM controller should
never do.

Once the UID is set on the patch, the API server will fail the
request at a slightly earlier point with an "uid mismatch" conflict
error, which the SVM controller can handle gracefully.

Setting UID by itself is not sufficient.  When a resource gets
deleted and recreated, if RV is not set but UID is set, we would get
an immutable field validation error for attempting to update the
UID.  To address this, we set the resource version on the SSA patch
as well.  This will cause that update request to also fail with a
conflict error.

Added the create verb on all resources for SVM controller RBAC as
otherwise the API server will reject the request before it fails
with a conflict error.

The change addresses a host of other issues with the SVM controller:

1. Include failure message in SVM resource
2. Do not block forever on unsynced GC monitor
3. Do not immediately fail on GC monitor being missing, allow for
   a grace period since discovery may be out of sync
4. Set higher QPS and burst to handle large migrations

Test changes:

1. Clean up CRD webhook convertor logs
2. Allow SVM tests to be run multiple times to make finding flakes easier
3. Create and delete CRs during CRD test to force out any flakes
4. Add a stress test with multiple parallel migrations
5. Enable RBAC on KAS
6. Run KCM directly to exercise wiring and RBAC
7. Better logs during CRD migration
8. Scan audit logs to confirm SVM controller never creates

Signed-off-by: Monis Khan <mok@microsoft.com>
2024-07-18 17:19:11 -04:00
Lukasz Szaszkiewicz
2f5394567e Revert "kube-controller-manager: enable WatchListClient"
This reverts commit 825091693d.
2024-07-18 09:29:53 +02:00
Kubernetes Prow Robot
8aff9d3192 Merge pull request #126072 from aroradaman/proxy-config-v1alpah2-windows
kube-proxy: internal config: add Linux and Windows section
2024-07-16 19:37:12 -07:00
Kubernetes Prow Robot
5f7cfdef11 Merge pull request #125993 from macsko/increase_server_timeout_in_scheduler_perf_tests
Increase API server timeout in scheduler_perf integration tests
2024-07-16 08:15:10 -07:00
Daman Arora
6c10c97c3c kube-proxy: internal config: add Linux section
Introduce Linux section for internal configuration of kube-proxy
adhering to the v1alpha2 version specifications as detailed in
https://kep.k8s.io/784.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-07-16 19:20:48 +05:30
Kubernetes Prow Robot
0fa4b9e14c Merge pull request #126109 from my-git9/staticpod
kubeadm: remove unused function in util/staticpod
2024-07-15 23:45:10 -07:00
Kubernetes Prow Robot
2263f2d719 Merge pull request #124148 from cyclinder/add_flag_kubelet
kubelet: Add a TopologyManager policy option: max-allowable-numa-nodes
2024-07-15 19:27:16 -07:00
Daman Arora
7a6fec3ea7 kube-proxy: internal config: add Windows section
Introduce Windows section for internal configuration of kube-proxy
adhering to the v1alpha2 version specifications as detailed in
https://kep.k8s.io/784. This also introduces WindowsRunAsService
to v1alpha1 configuration.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-07-15 22:43:47 +05:30
Kubernetes Prow Robot
7bbc891f9b Merge pull request #125769 from siyuanfoundation/api-comp-ver1
add emulated-version flag to kube-scheduler to control the feature gate.
2024-07-15 09:01:17 -07:00
Christian Schlotter
405fd111c2 kubeadm: use separate phase for changing the kubelet's kubeconfig on upgrade for ControlPlaneKubeletLocalMode 2024-07-15 11:19:21 +02:00
xin.li
fbf8cf41a7 kubeadm: remove unused function in util/staticpod
Signed-off-by: xin.li <xin.li@daocloud.io>
2024-07-14 16:57:25 +08:00
Kubernetes Prow Robot
33ccc51cb7 Merge pull request #125780 from chrischdi/pr-kubeadm-control-plane-kubelet-local-init
kubeadm: consider feature gate ControlPlaneKubeletLocalMode on init and upgrade
2024-07-12 12:50:16 -07:00
SataQiu
69a2bebc70 kubeadm: fix a bug that ImageExists check returns true when the image isn't in the local storage 2024-07-11 22:42:40 +08:00
Daman Arora
0d14f18f8f cmd/kube-proxy: refactor options test
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-07-10 23:55:28 +05:30
Daman Arora
458b56811a cmd/kube-proxy: refactor server.go
Split server.go into server.go and options.go and same for
server_test.go

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-07-10 23:55:27 +05:30
Daman Arora
210ed2fc41 kube-proxy: fix error wrapping, error handling and deprecated methods
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-07-10 23:51:17 +05:30
Maciej Skoczeń
ad59b4026e Increase API server timeout in scheduler_perf tests 2024-07-10 07:34:59 +00:00
Siyuan Zhang
40cddbe215 add emulated-version flag to kube-scheduler to control the feature gate.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-07-09 09:04:41 -07:00
cyclinder
87129c350a kubelet: Add a TopologyManager policy options: "max-allowable-numa-nodes"
Signed-off-by: cyclidner <kuocyclinder@gmail.com>
2024-07-09 22:26:24 +08:00
Kubernetes Prow Robot
79fee524e6 Merge pull request #125483 from wojtek-t/storage_readiness_hook
Implement resilient watchcache initialization post-start-hook
2024-07-01 13:48:29 -07:00
Wojciech Tyczyński
a5772bd425 Implement resilient watchcache initialization post-start-hook 2024-07-01 12:54:57 +02:00
Kubernetes Prow Robot
d729af9446 Merge pull request #125591 from p0lyn0mial/upstream-promote-watch-list-to-beta
Promote WatchList feature to Beta
2024-07-01 02:31:14 -07:00
Kubernetes Prow Robot
93d56511e6 Merge pull request #125021 from aojea/servicecidrbeta
KEP-1880 Multiple Service CIDRs: Graduate to Beta (2/2)
2024-06-30 08:53:25 -07:00
Antonio Ojea
0e1f9dadd6 modify components to use the networking v1beta1 API 2024-06-30 09:48:46 +00:00
SataQiu
d9001c7b00 kubeadm: the '--feature-gates' flag is deprecated and no-op for 'kubeadm upgrade apply/plan' 2024-06-30 11:22:24 +08:00
Alex Stundzia
58ff17bbfa When using external CA, look for common trust anchor within CA bundle. 2024-06-28 18:04:31 -05:00
Christian Schlotter
8871513c1b review fixes 2024-06-28 17:15:51 +02:00
Kubernetes Prow Robot
5e331569e4 Merge pull request #125779 from SataQiu/fix-upgrade-diff-20240628
kubeadm: fix a bug where the path of the manifest can not be specified when 'upgrade diff' specified a config file
2024-06-28 07:04:00 -07:00
Christian Schlotter
e51b55b451 kubeadm: feature gate ControlPlaneKubeletLocalMode on upgrade 2024-06-28 13:31:26 +02:00
Kubernetes Prow Robot
e832b70230 Merge pull request #125545 from claudiubelu/unittests-12
unittests: Fixes unit tests for Windows (part 12)
2024-06-28 03:57:56 -07:00
Christian Schlotter
241c1c7737 kubeadm: feature gate ControlPlaneKubeletLocalMode on init 2024-06-28 12:57:51 +02:00
SataQiu
7c2384d374 kubeadm: mark '--api-server-manifest', '--controller-manager-manifest' and '--scheduler-manifest' as deprecated flags 2024-06-28 18:53:05 +08:00
SataQiu
975f1c978d kubeadm: fix a bug where the path of the manifest can not be specified when 'upgrade diff' specified a config file 2024-06-28 18:01:19 +08:00
Claudiu Belu
b5e3b81de6 unittests: Fixes unit tests for Windows (part 12)
Currently, there are some unit tests that are failing on Windows due
to various reasons:

- IPVS proxy mode is not supported on Windows.
- pkg/kubelet/cri/remote was moved to cri-client.
2024-06-28 08:05:38 +00:00
Kubernetes Prow Robot
d40676c227 Merge pull request #122047 from aojea/treeless
KEP-1880 Multiple Service CIDRs: Graduate to Beta (1/2)
2024-06-28 01:00:20 -07:00
Kubernetes Prow Robot
522e2e5066 Merge pull request #124917 from vinayakankugoyal/kep4633
KEP-4633: Only allow anonymous auth for configured endpoints.
2024-06-27 20:39:51 -07:00
Vinayak Goyal
5e6a4937f5 KEP-4633: Allow health-only anonymous auth mode.
Signed-off-by: Vinayak Goyal <vinaygo@google.com>
2024-06-28 00:30:05 +00:00
Antonio Ojea
9b1bad431b implement dual write on Service ClusterIP allocator
MultiCIDRServiceAllocator implements a new ClusterIP allocator based on
IPAddress object to solve the problems and limitations caused by
existing bitmap allocators.

However, during the rollout of new versions, deployments need to support
a skew of one version between kube-apiservers. To avoid the possible
problem where there are multiple Services requests on the skewed
apiservers and that both allocate the same IP to different Services,
the new allocator will implement a dual-write strategy under the
feature gate DisableAllocatorDualWrite.

After the MultiCIDRServiceAllocator is GA, the DisableAllocatorDualWrite
can be enabled safely as all apiservers will run with the new
allocators. The graduation of DisableAllocatorDualWrite can also
be used to clean up the opaque API object that contains the old bitmaps.

If MultiCIDRServiceAllocator is enabled and DisableAllocatorDualWrite is disable
and is a new environment, there is no bitmap object created, hence, the
apiserver will initialize it to be able to write on it.
2024-06-27 11:33:36 +00:00
SataQiu
7120b3902c kubeadm: improve the error/warning messages of 'validateSupportedVersion' to include the checked resource kind 2024-06-27 18:47:09 +08:00
SataQiu
6190152abd kubeadm: update the long description about 'kubeadm config' command 2024-06-27 15:54:42 +08:00
Lukasz Szaszkiewicz
825091693d kube-controller-manager: enable WatchListClient 2024-06-27 09:01:06 +02:00