Commit Graph

119747 Commits

Author SHA1 Message Date
Antonio Ojea
c3d9b77d94 update ServiceCIDR API: replace IPv4,IPv6 fields by an array of strings
https: //docs.google.com/document/d/1-CKDPRHsG6XfnGs-Bb7ptWgDtTq9-hj8aJQpGz1CSh8/edit

Change-Id: If7134a5553b4ecc12b1d58ffc52ebb9f8594778a
2023-10-31 21:05:06 +00:00
Antonio Ojea
599597ca65 fix race on ServiceCIDR deletion
When a ServiceCIDR is deleted, the service CIDR controller on the
controller manager verifies that is safe to be deleted before removing
the finalizer, howerver, since the information of deletion takes time to
propragate, there can be a race where the apiserver allocators didn't
receive the information of deletion and assign an IP address that will
be orphan.

To avoid this race, the service cidr controller waits a grace period
before removing the finalizer to ensure the allocators do not assign any
new IP Address from that range before is completely deleted.

Change-Id: Ib34d32c0bdde91c6e84f1d056db9374589b25c0b
2023-10-31 21:05:06 +00:00
Antonio Ojea
e3a0df26a8 remove flag cidr max size validation if gate enable 2023-10-31 21:05:06 +00:00
Antonio Ojea
8182c4d9ec make update
Change-Id: I4007d4f6dda24b5c74f602d35191556f315de222
2023-10-31 21:05:05 +00:00
Antonio Ojea
cb509b01f3 e2e for ServiceCIDRs
Change-Id: Id7b711e30def4ac02f9e55425b1997d2cfe100f9
2023-10-31 21:05:05 +00:00
Antonio Ojea
46b13d48e2 etcd data
Change-Id: I31c3a1c8fee7f3a681186b934bd7c6b36baee6df
2023-10-31 21:05:05 +00:00
Antonio Ojea
ccbcadb032 add integration test
Since ServiceCIDR and IPAddresses are mostly API driven integration
test will give us a good coverage, exercising real use cases like
the migration from one ServiceCIDR range to a new range.
2023-10-31 21:05:05 +00:00
Antonio Ojea
4ff80864e1 service cidr controller manager
Controls the lifecycle of the ServiceCIDRs adding finalizers and
setting the Ready condition in status when they are created, and
removing the finalizers once it is safe to remove (no orphan IPAddresses)

An IPAddress is orphan if there are no ServiceCIDR containing it.

Change-Id: Icbe31e1ed8525fa04df3b741c8a817e5f2a49e80
2023-10-31 21:05:05 +00:00
Antonio Ojea
164276175f plumb the new multicidr clusterip allocator 2023-10-31 21:05:05 +00:00
Antonio Ojea
65e6938946 make repair loop multi service cidr aware
The repair loop controller watches the ServiceCIDRs configured
and use them to handle the repair of the IPAddresses assigned
by the kube-apiserver.

Change-Id: I8cfe8fd6285ea91192fc4ec72eaeea1eb004a235

Change-Id: If4be12e2c67b340d86c4efa2f9fb3672f0661636
2023-10-31 21:05:05 +00:00
Antonio Ojea
63fe539b4e expand IPAllocator to work with multiple ServiceCIDRs
Create a new allocator that uses the ServiceCIDRs configured in the
system to create IPAllocators.

The CIDRAllocator will create IPAllocators per parent ServiceCIDRs,
since we allow overlapping, there is no need to have an allocator
per ServiceCIDR.
The benefit of the IPAllocator is that uses the informer cache as
storage, hence, it does not need to keep cache and as only as logical
abstraction. This allows to create and delete IPAllocators without
any penalty.

IPAllocators can allocate IP addresses only if they are ready (not
being deleted)

Change-Id: I3fdda69991907c39cca3120fe2d850f14dcccec2
2023-10-31 21:05:04 +00:00
Antonio Ojea
d3386e171a add iptree radix tree util
A radix tree is required to optimize operations with subnets and
IP addresses.

Change-Id: I9fecc291efd39bdd7403c9675c047d6dee6018d2

Change-Id: I72c7bd5920a42bf35305443450c4ba97f857c492
2023-10-31 21:05:04 +00:00
Antonio Ojea
3b450378e0 bootstrap controller for default ServiceCIDR
The bootstrap controller for ServiceCIDR ensures that the default
ServiceCIDR is created from the existing flags.

It follows the same behavior than the kubernetes.default Service,
it only creates the default ServiceCIDR if it doesn't exist, but
does not modify it despite the parameters doesn't match.

review: bootstrap controller for default ServiceCIDR
2023-10-31 21:05:04 +00:00
Antonio Ojea
55a35bebee API printers
Change-Id: I7a0777bbd0b10e1a849c7891439b00622ec6b09c
2023-10-31 21:05:04 +00:00
Antonio Ojea
7e77e8b21d kubectl describe
Change-Id: I0664e11a3a5549e1cc9602b22dcaf294200792a4
2023-10-31 21:05:04 +00:00
Antonio Ojea
2feb1503e2 Add ServiceCIDR to the REST Registry
Change-Id: If2ab86505b1ffd94100f575e682702679dd2da72
2023-10-31 21:05:04 +00:00
Antonio Ojea
391b25197b add apis to apiserver storage
Change-Id: I33dfbdad98695a6438c55d841139476cb1d740d7
2023-10-31 21:05:04 +00:00
Antonio Ojea
632081a907 add ServiceCIDR APIs
Change-Id: Ia084c5505e43033ac34449031a1d32418ca326fd

Change-Id: Iafc236d456f7185a5c89a65d7b96245e04060013
2023-10-31 21:05:04 +00:00
Antonio Ojea
16363b6fb4 fix IPAddress.Name validation message
Change-Id: Idc29166d69c1eadd6e4dac3bf16f4a6739f98be2
2023-10-31 21:05:04 +00:00
Jordan Liggitt
df80775693 Include managed field comparison in test 2023-10-31 14:03:39 -07:00
Kubernetes Prow Robot
3631efd85c
Merge pull request #121651 from jiahuif-forks/fix/cel/type-resolver-safe-guard
CEL type resolvers: avoid infinite recursion for type resolvers.
2023-10-31 21:50:37 +01:00
Kubernetes Prow Robot
113f133b2a
Merge pull request #121637 from dims/update-to-new-cadvisor-v0.48.1
Update to new cadvisor v0.48.1
2023-10-31 21:50:23 +01:00
Anish Ramasekar
cc190e0ace
add integration tests
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-10-31 20:16:12 +00:00
Anish Ramasekar
26e3a03d12
Implement CEL and wire it with OIDC authenticator
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-10-31 20:16:09 +00:00
Kubernetes Prow Robot
00b56955fd
Merge pull request #121210 from msau42/owners
Add sig OWNERS to registry packages
2023-10-31 20:23:59 +01:00
Kubernetes Prow Robot
dba565193c
Merge pull request #121104 from carlory/kep-3751-api-changes
[KEP-3571] introduce the VolumeAttributesClass API
2023-10-31 20:23:50 +01:00
Kubernetes Prow Robot
0c93f40374
Merge pull request #120995 from aroradaman/move-get-kernel-version
move GetKernelVersion out of pkg/proxy/ipvs
2023-10-31 20:23:41 +01:00
Kubernetes Prow Robot
07d2da75bd
Merge pull request #120707 from Jefftree/csa-openapiv3
Use OpenAPI V3 for client side SMP
2023-10-31 20:23:27 +01:00
Andrew Sy Kim
e411fd340c cluster/gce: add webhook to replace PersistentVolumeLabel admission controller
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2023-10-31 18:52:22 +00:00
Lukasz Szaszkiewicz
7e35823690 cacher: when forgeting a watcher, call stopWatcherLocked multiple times
It's possible that the watcher is already not in the structure (e.g. in case of
simultaneous Stop() and terminateAllWatchers(), but it is safe to call stopLocked()
on a watcher multiple times.
2023-10-31 19:43:35 +01:00
Davanum Srinivas
bd233a2aa5
typo/api change in cadvisor / updated unwanted-dependencies.json
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-10-31 14:30:57 -04:00
Davanum Srinivas
8b9fc325e2
Update to new cadvisor v0.48.1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-10-31 14:30:54 -04:00
Kubernetes Prow Robot
0294521985
Merge pull request #121649 from enj/enj/c/ec_controller_ctx
encryptionconfig/controller: run unit tests faster
2023-10-31 19:16:56 +01:00
Kubernetes Prow Robot
3570075e4f
Merge pull request #121647 from aojea/fixrace
Revert "cacher: when forgeting a watcher, call stopWatcherLocked mult…
2023-10-31 19:16:47 +01:00
Kubernetes Prow Robot
be636a436b
Merge pull request #121646 from kubernetes/revert-121614-decode-respect-timeout-context
Revert "Make the decode function respect the timeout context"
2023-10-31 19:16:38 +01:00
Kubernetes Prow Robot
d1113c9a00
Merge pull request #121577 from cici37/celFixPick
Bump cel-go to v0.17.7 and introduce set ext library with new options
2023-10-31 19:16:29 +01:00
Kubernetes Prow Robot
d475c249da
Merge pull request #120954 from HirazawaUi/deprecate-kubeProxyVersione-field
deprecate the kubeProxyVersion field of v1.Node
2023-10-31 19:16:20 +01:00
Kubernetes Prow Robot
ac6f707155
Merge pull request #120620 from tzneal/sidecar-termination-ordering
sidecars: terminate sidecars after main containers
2023-10-31 19:16:11 +01:00
Kubernetes Prow Robot
418e9d08a4
Merge pull request #120592 from AxeZhan/validation_sets
Use generic set in package "/pkg/apis/core/validation"
2023-10-31 19:16:02 +01:00
Kubernetes Prow Robot
a5ff0324a9
Merge pull request #120461 from gjkim42/do-not-reuse-device-of-restartable-init-container
Don't reuse the device of a restartable init container
2023-10-31 19:15:53 +01:00
Kubernetes Prow Robot
5d03ce7ae4
Merge pull request #120354 from aroradaman/proxy-conntrack-api
Add support for `nf_conntrack_tcp_be_liberal` sysctl to kube-proxy
2023-10-31 19:15:44 +01:00
Kubernetes Prow Robot
2c300ef6b0
Merge pull request #120269 from gjkim42/fix-restart-containers-in-right-order-after-podsandbox-changed
Restart containers in right order with SidecarContainers enabled
2023-10-31 19:15:35 +01:00
Kubernetes Prow Robot
bfeb3c2621
Merge pull request #119447 from gjkim42/do-not-reuse-cpu-set-of-restartable-init-container
Don't reuse CPU set of a restartable init container
2023-10-31 19:15:26 +01:00
Kubernetes Prow Robot
dea3f1a119
Merge pull request #112599 from fabi200123/Adding-Windows-Support-for-InPlaceVerticalScaling
Adding Windows support for InPlace Pod Vertical Scaling
2023-10-31 19:15:12 +01:00
Jiahui Feng
e4776e0f85 avoid infinite recursion for type resolvers. 2023-10-31 10:23:50 -07:00
Kubernetes Prow Robot
8f163470ea
Merge pull request #121636 from sairameshv/121444-fix
[Node E2E Tests] Minor fix to copy the required kubelet, service logs
2023-10-31 18:10:19 +01:00
Kubernetes Prow Robot
ef658637fd
Merge pull request #121611 from atiratree/test-gated-controllers
controller descriptors should not be feature gated
2023-10-31 18:10:07 +01:00
Maciej Szulik
fba2d2fadc
Move invocation to not to cause ginkgo panic 2023-10-31 17:50:43 +01:00
Jefftree
eb32969ab8 Lazy load OpenAPIV2 2023-10-31 12:45:45 -04:00
Jefftree
f23ab829be Add feature toggle for OpenAPI V3 apply in kubectl 2023-10-31 12:45:45 -04:00