Commit Graph

120315 Commits

Author SHA1 Message Date
kiashok
252e1d2dfe Imagepull per runtime class alpha release changes
This commit does the following:
1. Add RuntimeClassInImageCriApi feature gate
2. Extend pkg/kubelet/container Image struct
3. Adds runtimeHandler string in the following CRI calls
   i.   ImageStatus
   ii.  PullImageRequest
   iii.  RemoveImage

Signed-off-by: kiashok <kiashok@microsoft.com>
2023-10-31 15:52:46 -07:00
Kubernetes Prow Robot
715cd17c0d
Merge pull request #121645 from p0lyn0mial/upstream-fix-race-in-test-forget-watcher
bring back: cacher: when forgeting a watcher, call stopWatcherLocked multiple times
2023-10-31 22:57:08 +01:00
Kubernetes Prow Robot
3eba6fc9ad
Merge pull request #121628 from andrewsykim/cloud-pvl-admission
cluster/gce: add webhook to replace PersistentVolumeLabel admission controller
2023-10-31 22:56:59 +01:00
Kubernetes Prow Robot
84aca4ac74
Merge pull request #121579 from gjkim42/test-enable-sidecarcontainers
Promote SidecarContainers feature to beta
2023-10-31 22:56:50 +01:00
Dan Winship
0993bb78ef Redo service dispatch with maps 2023-10-31 17:54:53 -04:00
Dan Winship
9d71513ac1 Redo no-endpoint handling with maps 2023-10-31 17:54:53 -04:00
Dan Winship
4128631d0f Redo LoadBalancerSourceRanges firewall using sets 2023-10-31 17:54:53 -04:00
Dan Winship
edaa1d735b Redo --nodeport-addresses handling with a set 2023-10-31 17:54:53 -04:00
Dan Winship
ef1347b06d Port NAT rules to nftables (and backend is now functional) 2023-10-31 17:54:51 -04:00
Dan Winship
0c5c620b4f Port filter rules to nftables 2023-10-31 17:40:45 -04:00
Dan Winship
6cff415305 Port service/endpoint chain creation/cleanup to nftables 2023-10-31 17:40:45 -04:00
Dan Winship
2735ad541e Port table setup/cleanup code to nftables 2023-10-31 17:40:30 -04:00
Dan Winship
bcced184c5 Replace "iptables-restore" sync in nftables/proxier.go with (trivial) "nft -f -" sync 2023-10-31 17:38:32 -04:00
Dan Winship
93860a5217 Distinguish iptables-based and nftables-based backends, do startup cleanup
When switching from iptables or ipvs to nftables, clean up old
iptables/ipvs rules. When switching the other way, clean up old
nftables rules.
2023-10-31 17:38:32 -04:00
Dan Winship
abb1a458a9 Create an nftables.Interface in nftables proxier
And update most of the comments to refer to "nftables" rather than
"iptables" (even though it doesn't actually do any nftables updating
at this point).

For now the proxy also internally creates a
utiliptablestesting.FakeIPTables to keep the existing sync code
compiling.
2023-10-31 17:38:29 -04:00
Dan Winship
1a530457f9 Drop unit tests of iptables-specific unit test helpers
(We'll eventually have nftables versions.)
2023-10-31 17:33:53 -04:00
Dan Winship
958e80ca3b Clarify nftables/proxier.go by distinguishing nat/filter table KUBE-SERVICES chains
(It is confusing, but allowed, to have distinct "KUBE-SERVICES" chains
in "nat" and "filter" in iptables, but in nftables the "type nat" and
"type filter" chains end up in the same table, so we'll need different
names for the two.)
2023-10-31 17:33:53 -04:00
Dan Winship
3abdda9800 Simplify nftables/proxier.go by using string rather than utiliptables.Chain
Change the svcPortInfo and endpointInfo fields to string rather than
utiliptables.Chain, and various fixups from there.

Also use a proper set for activeNATChains, and fix the capitalization
of endpointInfo.chainName.
2023-10-31 17:33:53 -04:00
Dan Winship
96e53f64f4 Simplify nftables/proxier.go by removing the "args" reuse
since that will be done differently in nftables
2023-10-31 17:33:53 -04:00
Dan Winship
6535ac1e61 Simplify nftables/proxier.go by removing Monitor stuff
since it shouldn't be necessary
2023-10-31 17:33:53 -04:00
Dan Winship
ecb7752f0b Simplify nftables/proxier.go by removing HaveRandomFully checks 2023-10-31 17:33:53 -04:00
Dan Winship
5f09106063 Simplify nftables/proxier.go by dropping "-j ACCEPT" rules 2023-10-31 17:33:53 -04:00
Dan Winship
1a6b9b811e Simplify nftables/proxier.go by removing localhost nodeport support
and related route_localnet setting / anti-martian-packet rule
2023-10-31 17:33:53 -04:00
Dan Winship
e7c35d27f7 Simplify nftables/proxier.go by removing partial syncing
Since optimization will be done differently in nftables.
2023-10-31 17:33:53 -04:00
Dan Winship
39a5af1d0a Simplify nftables/proxier.go by removing large-cluster mode
since things will be optimized differently in nftables
2023-10-31 17:33:53 -04:00
Abu Kashem
cac26737cd
apiserver: add conformance tests for flowcontrol API 2023-10-31 17:33:05 -04:00
Dan Winship
a70653143e Add a dummy nftables kube-proxy backend which is just a copy of iptables 2023-10-31 17:31:42 -04:00
Antonio Ojea
ce5a22d54c hack/update-codegen
Change-Id: I929e8fe0313ec2e0aef2b26a5138cd88bdfe8914
2023-10-31 21:07:44 +00:00
Antonio Ojea
3b69bd6a9b servicecidrs controller clarify condition false reevaluation
Change-Id: I0eb8d39abe9b7b0ce6472ff426e9a62e7155aae1
2023-10-31 21:05:58 +00:00
Antonio Ojea
fee07ad608 make update with the new API with arrays 2023-10-31 21:05:58 +00:00
Antonio Ojea
9917c727a1 test e2e: use new ServiceCIDR API
Change-Id: I82075c4252d8734886f80dd68327fe73e2ed4ba5
2023-10-31 21:05:57 +00:00
Antonio Ojea
5d90d07f2d test integration: use new ServiceCIDR API
Change-Id: I7aaa978842fbe8d75383f8a3159ca4fce01ffdcb
2023-10-31 21:05:57 +00:00
Antonio Ojea
271900a0f0 integration etcd data: use new ServiceCIDR API
Change-Id: I68a91815b3220a41e97667d8f8f4a3bdf5a91e8a
2023-10-31 21:05:57 +00:00
Antonio Ojea
3edcce52e3 service cidr controller manager: use new ServiceCIDR API 2023-10-31 21:05:50 +00:00
Antonio Ojea
016c3c9e36 repairip controller: use new ServiceCIDR API 2023-10-31 21:05:06 +00:00
Antonio Ojea
881cf4d54f ipallocator/cidrallocator: use new ServiceCIDR API
Change-Id: I5b300373e21cc65f6ef171790ef81ee391f1c752

cidrallocator

Change-Id: I13050a9d60360e555b75a13beaa9a923268ec4e8
2023-10-31 21:05:06 +00:00
Antonio Ojea
7e87806fab default_servicecidr_controller: use new ServiceCIDR API
Change-Id: I2c53815136e0d985959420911339aacd62e01e78
2023-10-31 21:05:06 +00:00
Antonio Ojea
513fdb5422 describer: use new ServiceCIDR API
Change-Id: Iff11c70f20bab3e55e4e569fb110ef25dd6dd97e
2023-10-31 21:05:06 +00:00
Antonio Ojea
5123a93b34 printers: use new ServiceCIDR API
Change-Id: Iaedeb99fcdb6e27e9987bccb1ccc32fab7da71f6
2023-10-31 21:05:06 +00:00
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