Commit Graph

6735 Commits

Author SHA1 Message Date
Dan Winship
7259742e23 Make Endpoints controller always canonicalize the IPs it writes out
Also, fix the unit tests to not sometimes generate alleged pod IPs
like "1.2.3.999".
2025-02-11 21:46:13 -05:00
Dan Winship
1bd3d34d6f Remove some dead code in the Endpoints controller
There was code to deal with upgrades from pre-dual-stack-aware
apiservers, with a note to "remove when the possibility of upgrading
from a cluster that does not support dual stack is nil".

(This requires fixing the unit tests to fill in
service.Spec.IPFamilies like a modern apiserver would do.)
2025-02-11 18:11:56 -05:00
Gunju Kim
0bee0bcaa7 Promote SidecarContainers feature to GA 2025-02-02 17:45:36 +09:00
Kubernetes Prow Robot
586f0fad5c Merge pull request #125046 from tklauser/min-max-builtins
Use Go 1.21 min/max builtins
2025-01-30 07:33:23 -08:00
Davanum Srinivas
4e05bc20db Linter to ensure go-cmp/cmp is used ONLY in tests
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-01-24 20:49:14 -05:00
Filip Křepinský
e263b878ee Deployment controller should count terminating pods in the status 2025-01-23 22:37:05 +01:00
Filip Křepinský
dc1914c61c ReplicaSet controller should count terminating pods in the status 2025-01-23 22:26:34 +01:00
Kubernetes Prow Robot
a444a5bfed Merge pull request #129732 from dims/switch-to-v2.6.3-of-gopkg.in/go-jose/go-jose.v2
Switch to gopkg.in/go-jose/go-jose.v2 @ v2.6.3 and github.com/coreos/go-oidc @ v2.3.0
2025-01-22 13:40:38 -08:00
Davanum Srinivas
c9e81cd84c Switch to gopkg.in/go-jose/go-jose.v2 @ v2.6.3
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-01-21 09:21:27 -05:00
Antonio Ojea
7721590b9e update controller manager 2025-01-20 13:01:53 +00:00
Kubernetes Prow Robot
4766d191f4 Merge pull request #129577 from ning0515/fix-125332
Only set worker to nil when the key exists.
2025-01-20 01:14:36 -08:00
XiangNing Xia
25a6fa144f There is no need to set the worker to nil to avoid potential timing issues. 2025-01-17 10:10:58 +00:00
jasondrogba
94d90fafee fix name 2025-01-15 18:14:32 +08:00
xigang
0e55e47cff Remove unnecessary logging in FilterActivePods
Signed-off-by: xigang <wangxigang2014@gmail.com>
2025-01-11 10:44:00 +08:00
Adrian Moisey
42a5e5f425 Pass context down to wait.PollUntilContextTimeout 2025-01-07 16:25:55 +02:00
Adrian Moisey
6168143386 Remove use of deprecated functions
Removes use of deprecated functions in k8s.io/utils/pointer and k8s.io/apimachinery/pkg/util/sets
2024-12-31 15:11:38 +02:00
Arda Güçlü
a88e08c397 Do not attempt to truncate revision history if revisionHistoryLimit is negative 2024-12-19 11:35:29 +03:00
Kubernetes Prow Robot
e305c33988 Merge pull request #126387 from pohly/log-client-go-tools-cache-apis
client-go/tools/cache: add APIs with context parameter
2024-12-18 20:00:09 +01:00
Patrick Ohly
4638ba9716 client-go/tools/cache: add APIs with context parameter
The context is used for cancellation and to support contextual logging.

In most cases, alternative *WithContext APIs get added, except for
NewIntegerResourceVersionMutationCache where code searches indicate that the
API is not used downstream.

An API break around SharedInformer couldn't be avoided because the
alternative (keeping the interface unchanged and adding a second one with
the new method) would have been worse. controller-runtime needs to be updated
because it implements that interface in a test package. Downstream consumers of
controller-runtime will work unless they use those test package.

Converting Kubernetes to use the other new alternatives will follow. In the
meantime, usage of the new alternatives cannot be enforced via logcheck
yet (see https://github.com/kubernetes/kubernetes/issues/126379 for the
process).

Passing context through and checking it for cancellation is tricky for event
handlers. A better approach is to map the context cancellation to the normal
removal of an event handler via a helper goroutine. Thanks to the new
HandleErrorWithLogr and HandleCrashWithLogr, remembering the logger is
sufficient for handling problems at runtime.
2024-12-18 18:45:02 +01:00
Kubernetes Prow Robot
77749c21f6 Merge pull request #127193 from DP19/ignore-unready-pods-hpa-containermetrics
allow ContainerResource calculations to continue with missing metrics like Resource calculations
2024-12-13 15:18:25 +01:00
Kubernetes Prow Robot
e8615e2712 Merge pull request #129054 from pohly/remove-import-name
remove import doc comments
2024-12-12 09:58:35 +01:00
Patrick Ohly
8a908e0c0b remove import doc comments
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:

- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.

This commit was generated with
   sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')

Everything was included, except for
   package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".
2024-12-02 16:59:34 +01:00
Adrian Moisey
90922f5c94 Fix linting issue in test
Lint error was introduced in
https://github.com/kubernetes/kubernetes/pull/128305 and backported in https://github.com/kubernetes/kubernetes/pull/128806

It was merged before I could fix it, so I thought I'd make a follow up
PR to fix it.

I won't be backporting this lint as it's only in tests (unless it makes
sense to backport?)
2024-11-19 12:20:02 +02:00
Kubernetes Prow Robot
3300aa1783 Merge pull request #128247 from mattcary/autodelete-ga
Promote StatefulSetAutoDeletePVC to stable in 1.32
2024-11-07 22:20:43 +00:00
Kubernetes Prow Robot
b82013ecd6 Merge pull request #127326 from stlaz/ctb_new_signer
trustbundles: add a new kube-apiserver-serving signer
2024-11-07 21:07:02 +00:00
Kubernetes Prow Robot
631d83b56f Merge pull request #128569 from tenzen-y/add-job-evaluation-orders-comment
Job: Add evaluation step comments in the syncJob
2024-11-07 18:32:43 +00:00
Kubernetes Prow Robot
50362ac7d0 Promote StatefulSetAutoDeletePVC to stable for 1.32. 2024-11-07 09:43:49 -08:00
Stanislav Láznička
a4b83e77d9 trustbundles: add a new kube-apiserver-serving signer 2024-11-07 18:07:06 +01:00
Yuki Iwai
5dda60ee4e Job: Add evaluation step comments in the syncJob
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2024-11-07 23:36:44 +09:00
Kubernetes Prow Robot
9a9331afd6 Merge pull request #124952 from AxeZhan/maxContainerRestarts
[Sidecar Containers] Pods comparison by maxContainerRestarts should account for sidecar containers
2024-11-07 11:13:30 +00:00
Kubernetes Prow Robot
1ac23e24a0 Merge pull request #127956 from carlory/KEP-3902-test
node-lifecycle-controller: improve processPod test-coverage
2024-11-07 08:51:30 +00:00
Harshal Neelkamal
6fdacf0411 Add plugin and key-cache for ExternalJWTSigner integration 2024-11-07 03:16:23 +00:00
杨朱 · Kiki
c4814f180a Use k8s.io/kubernetes/test/utils/ktesting 2024-11-07 10:36:13 +08:00
AxeZhan
7533123eb5 consider sidecar containers in maxContainerRestarts 2024-11-07 09:07:45 +08:00
Kubernetes Prow Robot
dfba334a33 Merge pull request #128242 from jsafrane/selinux-controller
1710: Add SELinux warning controller
2024-11-06 20:09:44 +00:00
Patrick Ohly
33ea278c51 DRA: use v1beta1 API
No code is left which depends on the v1alpha3, except of course the code
implementing that version.
2024-11-06 13:03:19 +01:00
Jan Safranek
8791efc732 Update property name in metrics
selinux_volume_conflict should not have space in its label value - it's
harder to query for that value. Use SELinuxLabel as both human friendly (in
an event) and label value.
2024-11-06 11:16:06 +01:00
Jan Safranek
cf7a2c7d35 Add a comment why PVC indexer is used 2024-11-06 11:16:06 +01:00
Jan Safranek
3ff3ed4b6d Add comment how GetPodsForCSIDriver is useful 2024-11-06 11:16:06 +01:00
Jan Safranek
6eab8a8691 Use RWLock for the controller cache
It could help a tiny bit with parallel operations.
2024-11-06 11:16:06 +01:00
Jan Safranek
e6807a8e4f Use _ for unused parameters
Sometimes the logger is not used. This fixes some linter warnings.
2024-11-06 11:16:06 +01:00
Jan Safranek
dfb88095b0 Rename label to seLinuxLabel
In various parameters, variables and fields. To make the name more
obvious.
2024-11-06 11:16:06 +01:00
Jan Safranek
e438bc0561 Rework event recorder startup
* Remove Controller.recorder field, there already is eventRecorder.
* Start the event broadcaster in Run(), to save a bit of CPU and memory
  when something initializes the controller, but does not Run() it.
* Log events with log level 3, as the other contollers usually do.
* Use StartStructuredLogging(), which looks fancier than StartLogging
2024-11-06 11:16:06 +01:00
Jan Safranek
da2d9fa16e Fix golint errors
Revealed by the new SELinux warning controller, but not related to it.
2024-11-06 11:16:05 +01:00
Jan Safranek
aa8872d7a3 Add SELinux warning controller 2024-11-06 11:16:02 +01:00
Jan Safranek
0d71dc677e Refactor CreateVolumeSpec
Rename old CreateVolumeSpec to CreateVolumeSpecWithNodeMigration that
extracts volume.Spec with node specific CSI migration.

Add CreateVolumeSpec that does the same, only without evaluating node CSI
migration.
2024-11-06 11:15:31 +01:00
Kubernetes Prow Robot
08391b3d27 Merge pull request #123549 from carlory/kep-3751-finalizer
A new controller adds/removes finalizer to VAC for protection
2024-11-05 21:45:30 +00:00
Filip Křepinský
05bc270870 add tests for getReplicaSetFraction in the deployment controller (#128535)
* better name variables in deployment_util

* add tests for getReplicaSetFraction in the deployment controller

- make validation more robust and make sure we do not divide by 0
2024-11-04 19:11:43 +00:00
Kubernetes Prow Robot
7a4d755644 Merge pull request #128507 from dims/use-k8s.io/utils/lru-instead-of-github.com/golang/groupcache/lru
Use k8s.io/utils/lru instead of github.com/golang/groupcache/lru
2024-11-04 19:11:35 +00:00
Alay Patel
3e3276e9fe Promote PodIndexLabel for Statefulset and IndexedJob stable (#128387)
* lock feature gate for PodIndexLabel and mark it GA

Signed-off-by: Alay Patel <alayp@nvidia.com>

* add emulated version if testing disabling of PodIndexLabel FG

Signed-off-by: Alay Patel <alayp@nvidia.com>

---------

Signed-off-by: Alay Patel <alayp@nvidia.com>
2024-11-04 19:11:28 +00:00