Commit Graph

999 Commits

Author SHA1 Message Date
Ricardo Katz
d816ab7657 Promote LoadBalancerIPMode to Beta 2024-02-22 08:35:12 -03:00
Kubernetes Prow Robot
0deaf12b88
Merge pull request #123044 from yanhuan0802/fix-incorrect-comment
fix: correct incorrect comment & function name about SchedulingGated
2024-02-20 09:42:03 -08:00
AxeZhan
c74ec3df09 graduate PodLifecycleSleepAction to beta 2024-02-19 19:40:52 +08:00
Kubernetes Prow Robot
8c6e940a97
Merge pull request #123098 from munnerz/4193-jti-audit-changes
use authentication.kubernetes.io/issued-credential-id audit annotation in serviceaccount token registry endpoint
2024-02-05 08:45:43 -08:00
James Munnelly
7f12735fff use authentication.kubernetes.io/issued-credential-id audit annotation in serviceaccount token registry endpoint 2024-02-05 10:24:31 +00:00
Huan Yan
01dbb85974 fix: correct incorrect comment & function name about SchedulingGated 2024-01-31 11:27:14 +08:00
Quan Tian
0ef42133a1 Reduce verbose logs in MetaAllocator
"Finished sync for CIDRs" was logged every 10 mins even there was no
change.

Signed-off-by: Quan Tian <qtian@vmware.com>
2024-01-23 00:07:10 +08:00
Kubernetes Prow Robot
138ac71fb1
Merge pull request #122011 from carlory/fix-121752
fix falky test pkg/registry/core/persistentvolume/storage TestUpdateStatus
2023-12-18 06:21:00 +01:00
ahutsunshine
d8bd150784 support pod namespace indexer
fix comments

optimize code

small optimization for the namespace scope check
2023-11-30 18:39:09 +08:00
carlory
91c94d007f fix falky test pkg/registry/core/persistentvolume/storage TestUpdateStatus 2023-11-23 21:51:23 +08:00
Humble Chirammal
3890546265 Update APIs and adjust tests
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-11-01 09:28:36 +05:30
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
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
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
Michelle Au
c4aab1036f Add sig OWNERS to registry packages 2023-10-31 01:20:16 +00:00
James Munnelly
76463e21d4 KEP-4193: bound service account token improvements 2023-10-30 21:15:10 +00:00
Roman Bednar
fb872e8638 test: fix storage status update test
After enabling PersistentVolumeLastPhaseTransitionTime feature, any
test that compares PV objects that transitioned phase needs to handle
timestamp values correctly.

Either the tests should avoid phase transitions if not needed or the
test needs to set the same timestamp on new PV object so it's not
changed and can be checked for equality later, the latter is used in
this commit.
2023-10-26 11:47:02 +02:00
Roman Bednar
53339894a1 enable PersistentVolumeLastPhaseTransitionTime feature gate for status update test 2023-10-26 11:47:02 +02:00
Roman Bednar
071a67d8c2 export time function
NowFunc() has to be exported so it is available for testing in other
packages.
2023-10-26 11:47:01 +02:00
Kubernetes Prow Robot
87981480f3
Merge pull request #119186 from seans3/stream-translator-proxy
Stream Translator Proxy and FallbackExecutor for WebSockets
2023-10-24 17:10:34 +02:00
Kubernetes Prow Robot
441d4b54ae
Merge pull request #120397 from ty-dc/StaticCheck
cleanup: omit comparison with bool constants
2023-10-24 05:25:52 +02:00
Sean Sullivan
168998e87b StreamTranslator and FallbackExecutor for WebSockets 2023-10-23 15:33:38 -07:00
Kubernetes Prow Robot
581552eaf0
Merge pull request #116065 from sanposhiho/match-label-key-alternative
feature(scheduler): implement matchLabelKeys in PodAffinity and PodAntiAffinity
2023-10-23 18:39:13 +02:00
Kubernetes Prow Robot
a23b900d23
Merge pull request #121372 from sttts/sttts-null-rest-getter
registry/core: wire NotFound getter instead of nil
2023-10-21 01:49:04 +02:00
Dr. Stefan Schimanski
eb3a11ea14
registry/core: wire NotFound getter instead of nil
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2023-10-19 22:34:48 +02:00
Kensei Nakada
d5d3c26337 feature(scheduler): implement matchLabelKeys in PodAffinity and PodAntiAffinity 2023-10-18 11:28:02 +00:00
Antonio Ojea
b7ee8e8422 drop UID from the IPAddress.Spec.ParentRef
This field is not needed, IPAddresses are unique and
the name is canonicalized to avoid duplicates.

Change-Id: Iccaaf5d55e2af61fea7af9abd39584a80ed4054e
2023-10-10 11:03:19 +00:00
Antonio Ojea
566fad5eda add metrics to the ipallocator repair loop
The repair loop are great for saving us of leaks, but the side effect
is that bugs can go unnoticed for a long time, so we need some
signal to be able to identify those errors proactivily.

Add two new metrics to identify:
- errors on the reconcile loop
- errors per clusterip
2023-09-30 15:46:06 +00:00
Antonio Ojea
4eff70dcf9 add metrics to the nodeport allocator repair loop
The repair loop are great for saving us of leaks, but the side effect
is that bugs can go unnoticed for a long time, so we need some
signal to be able to identify those errors proactivily.

Add two new metrics to identify:
- errors on the reconcile loop
- errors per nodeport
2023-09-30 15:46:06 +00:00
Antonio Ojea
21e26486ac sync Service API status rest storage
The Service API Rest implementation is complex and has to use different
hooks on the REST storage. The status store was making a shallow copy of
the storage before adding the hooks, so it was not inheriting the hooks.

The status store must have the same hooks as the rest store to be able
to handle correctly the allocation and deallocation of ClusterIPs and
nodePorts.

Change-Id: I44be21468d36017f0ec41a8f912b8490f8f13f55
Signed-off-by: Antonio Ojea <aojea@google.com>
2023-09-13 11:35:42 +00:00
tao.yang
b35357b6c0 cleanup: omit comparison with bool constants
Signed-off-by: tao.yang <tao.yang@daocloud.io>
2023-09-05 10:24:38 +08:00
Quan Tian
2b69daa960 Allow specifying ExternalTrafficPolicy for ClusterIP Services with ExternalIPs
When defining a ClusterIP Service, we can specify externalIP, and the
traffic policy of externalIP is subject to externalTrafficPolicy.
However, the policy can't be set when type is not NodePort or
LoadBalancer, and will default to Cluster when kube-proxy processes the
Service.

This commit updates the defaulting and validation of Service to allow
specifying ExternalTrafficPolicy for ClusterIP Services with
ExternalIPs.

Signed-off-by: Quan Tian <qtian@vmware.com>
2023-08-30 23:56:47 +08:00
Kubernetes Prow Robot
370c85f5ab
Merge pull request #118493 from kerthcet/cleanup/pod-status-reason
Remove reasons from PodConditionType
2023-08-30 01:40:47 -07:00
Kubernetes Prow Robot
df8bfdf55e
Merge pull request #120102 from p0lyn0mial/upstream-storage-etcd-new-params
storage/factory: extend the Create method by newList and resourcePrefix params
2023-08-24 05:22:32 -07:00
Lukasz Szaszkiewicz
ccabc01093 storage/factory: extend the Create method by newList and resourcePrefix params 2023-08-24 11:23:05 +02:00
Kubernetes Prow Robot
c034f321f9
Merge pull request #119879 from togettoyou/cleanup
Fix receiver names in legacyProvider
2023-08-23 08:07:29 -07:00
Kubernetes Prow Robot
c0691f3784
Merge pull request #119789 from thockin/deprecate_svc_lb_ingress_with_clusterip
Gate: disallow .status.loadBalancer on non-LB svc
2023-08-22 10:02:55 -07:00
Patrick Ohly
2472291790 api: introduce separate VolumeResourceRequirements struct
PVC and containers shared the same ResourceRequirements struct to define their
API. When resource claims were added, that struct got extended, which
accidentally also changed the PVC API. To avoid such a mistake from happening
again, PVC now uses its own VolumeResourceRequirements struct.

The `Claims` field gets removed because risk of breaking someone is low:
theoretically, YAML files which have a claims field for volumes now
get rejected when validating against the OpenAPI. Such files
have never made sense and should be fixed.

Code that uses the struct definitions needs to be updated.
2023-08-21 15:31:28 +02:00
Tim Hockin
a930892769
Gate: disallow .status.loadBalancer on non-LB svc
The fact that the .status.loadBalancer field can be set while .spec.type
is not "LoadBalancer" is a flub.  Any spec update will already clear
.status.ingress, so it's hard to really rely on this.  After this
change, updates which try to set this combination will fail validation.

Existing cases of this will not be broken.  Any spec/metadata update
will clear it (no error) and this is the only stanza of status.

New gate "AllowServiceLBStatusOnNonLB" is off by default, but can be
enabled if this change actually breaks someone, which seems exceeedingly
unlikely.
2023-08-20 16:40:41 -07:00
Kubernetes Prow Robot
ee265c92fe
Merge pull request #119937 from RyanAoh/kep-1860-dev
Make Kubernetes aware of the LoadBalancer behaviour
2023-08-17 14:00:28 -07:00
Kubernetes Prow Robot
fd4109d5f6
Merge pull request #119732 from sairameshv/pdb-fix
Fix to honor PDB with an empty selector `{}`
2023-08-15 19:44:00 -07:00
Aohan Yang
3ac2899d2b Add IP mode field 2023-08-14 11:24:49 +08:00
Junhao Zou
509ffe2938
Fix receiver names in legacyProvider 2023-08-10 14:59:46 +08:00
Mark Rossetti
0d90d1ffa5
Revert "Merge pull request #118895 from RyanAoh/kep-1860"
This reverts commit 890a6c8f70, reversing
changes made to 4f60a8d493.
2023-08-09 15:51:20 -07:00
Sai Ramesh Vanka
a6329ac453 Fix to honor PDB with an empty selector {}
PDB with an empty selector `{}` is selecting all the pods in a namespace.
But, during the `drain`, all the pods are getting evicted which is not expected.
This change should fix the issue and honor the pdb before evicting the pods.

Signed-off-by: Sai Ramesh Vanka <svanka@redhat.com>
2023-08-08 17:28:48 +05:30
Kubernetes Prow Robot
f3a070f9c6
Merge pull request #116469 from RomanBednar/pv-phase-transition-time
PersistentVolume last phase transition time
2023-07-21 16:10:07 -07:00
Roman Bednar
a9c3444a47 test: add coverage for pv status update and create strategy 2023-07-21 21:39:16 +02:00