Commit Graph

115088 Commits

Author SHA1 Message Date
Sergey Kanzhelev
1e6281e4a2 first iteration to add standalone mode 2023-03-14 20:46:41 +00:00
Mo Khan
81586ff81a
Add k8s.io/kms/internal/plugins/mock to internal modules 2023-03-14 16:31:54 -04:00
vinay kulkarni
86efc8bd79 Add isInPlacePodVerticalScalingAllowed for restart check block 2023-03-14 20:30:02 +00:00
Alexander Zielenski
4fb6385140 fix test to look for FIELD: not RESOURCE: when a field was looked up 2023-03-14 12:47:09 -07:00
Alexander Zielenski
0c0a91d4d9 throw missing field in std err 2023-03-14 12:47:08 -07:00
Davanum Srinivas
ee294de56d
missed registering kubelet-config-file for the command line use case running test-e2e-node target
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-14 15:46:31 -04:00
Kubernetes Prow Robot
9c2d28f7d5
Merge pull request #116595 from MadhavJivrajani/bump-kubectl-subresource-beta
kubectl: Change subresource flag to beta
2023-03-14 12:38:50 -07:00
Kubernetes Prow Robot
abb6328661
Merge pull request #116590 from MadhavJivrajani/e2e-kubectl-subresource
test/e2e: Add e2e tests for kubectl --subresource
2023-03-14 12:38:42 -07:00
Kubernetes Prow Robot
c47d2ae648
Merge pull request #116561 from mattcary/ss-v1beta1-defaulter
StatefulSet v1beta1 defaulter tests
2023-03-14 12:38:34 -07:00
Kubernetes Prow Robot
1d830156c7
Merge pull request #115299 from danwinship/stale-conntrack-handling
clean up kube-proxy stale-conntrack-entry handling, revert broken code
2023-03-14 12:38:26 -07:00
Ziqi Zhao
d1aa73312c
pkg/controller/util support contextual logging (#115049)
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-03-14 12:38:14 -07:00
vinay kulkarni
5b2682ac04 Make in-place resize exclusion conditions (such as static pods) very obvious 2023-03-14 19:37:35 +00:00
xing-yang
223a7c5506 Remove the unit test to enable the feature gate
vSphere CSI Migration feature gate is locked now.
2023-03-14 19:32:21 +00:00
Alexander Zielenski
180c312f31 log name of mising field, not path 2023-03-14 12:20:11 -07:00
Clayton Coleman
133dd61578
wait: Deprecate legacy Poll methods for new context aware methods
The Poll* methods predate context in Go, and the current implementation
will return ErrWaitTimeout even if the context is cancelled, which
prevents callers who are using Poll* from handling that error directly
(for instance, if you want to cancel a function in a controlled fashion
but still report cleanup errors to logs, you want to know the difference
between 'didn't cancel', 'cancelled cleanly', and 'hit an error).

This commit adds two new methods that reflect how modern Go uses
context in polling while preserving all Kubernetes-specific behavior:

	PollUntilContextCancel
	PollUntilContextTimeout

These methods can be used for infinite polling (normal context),
timed polling (deadline context), and cancellable poll (cancel context).
All other Poll/Wait methods are marked as deprecated for removal in
the future. The ErrWaitTimeout error will no longer be returned from the
Poll* methods, but will continue to be returned from ExponentialBackoff*.
Users updating to use these new methods are responsible for converting
their error handling as appropriate. A convenience helper
`Interrupted(err) bool` has been added that should be used instead of
checking `err == ErrWaitTimeout`. In a future release ErrWaitTimeout will
be made private to prevent incorrect use. The helper can be used with all
polling methods since context cancellation and deadline are semantically
equivalent to ErrWaitTimeout. A new `ErrorInterrupted(cause error)` method
should be used instead of returning ErrWaitTimeout in custom code.

The convenience method PollUntilContextTimeout is added because deadline
context creation is verbose and the cancel function must be called to
properly cleanup the context - many of the current poll users would see
code sizes increase. To reduce the overall method surface area, the
distinction between PollImmediate and Poll has been reduced to a single
boolean on PollUntilContextCancel so we do not need multiple helper methods.

The existing methods were not altered because ecosystem callers have been
observed to use ErrWaitTimeout to mean "any error that my condition func
did not return" which prevents cancellation errors from being returned
from the existing methods. Callers must make a deliberate migration.

Callers migrating to `PollWithContextCancel` should:

1. Pass a context with a deadline or timeout if they were previously using
	`Poll*Until*` and check `err` for `context.DeadlineExceeded` instead of
	`ErrWaitTimeout` (more specific) or use `Interrupted(err)` for a generic
	check.
2. Callers that were waiting forever or for context cancellation should
	ensure they are checking `context.Canceled` instead of `ErrWaitTimeout`
	to detect when the poll was stopped early.

Callers of `ExponentialBackoffWithContext` should use `Interrupted(err)`
instead of directly checking `err == ErrWaitTimeout`. No other changes are
needed.

Code that returns `ErrWaitTimeout` should instead define a local cause
and return `wait.ErrorInterrupted(cause)`, which will be recognized by
`wait.Interrupted()`. If nil is passed the previous message will be used
but clients are highly recommended to use typed checks vs message checks.

As a consequence of this change the new methods are more efficient - Poll
uses one less goroutine.
2023-03-14 13:14:11 -06:00
Aldo Culquicondor
3dae9ba6d6
Optimize topology spreading for null selector
Change-Id: I28f031a040b143fa9452b4400cc3ae85d58e572c
2023-03-14 15:01:59 -04:00
Sean Sullivan
26bf8a7ceb Aggregated discovery resilient to nil GVK 2023-03-14 18:50:06 +00:00
Sergey Kanzhelev
44159dfc32 AppArmor no reevaluation of host is needed 2023-03-14 18:35:01 +00:00
Alexander Zielenski
636c259474 use referred type's type when it is not an object
i think we should also do this when it has no GVK? objects with no GVK cant be explained
2023-03-14 11:20:16 -07:00
Patrick Ohly
f26f896128 hack/logcheck.conf: enforce contextual logging in kube-controller-manager
Not all PRs made it into 1.27, but enough that it is now easier to list the
exceptions.
2023-03-14 19:17:31 +01:00
Patrick Ohly
99151c39b7 kube-controller-manager: convert to structured logging
Most of the individual controllers were already converted earlier. Some log
calls were missed or added and then not updated during a rebase. Some of those
get updated here to fill those gaps.

Adding of the name to the logger used by each controller gets
consolidated in this commit. By using the name under which the
controller is registered we ensure that the names in the log
are consistent.
2023-03-14 19:16:32 +01:00
Aldo Culquicondor
d1dfa89953
Add integration test for DefaultBinder
Change-Id: I71ea08104024403a7d9ebcf3725fc3ff17997229
2023-03-14 13:57:11 -04:00
justinsb
d016fdcc83 kubectl prunev2: Refactor the applyset to be more reusable
This enables sharing with diff.
2023-03-14 17:56:47 +00:00
Jan Safranek
58c4ead0ad Add featureGate to CSIDriver.SELinuxMount 2023-03-14 18:47:17 +01:00
Kubernetes Prow Robot
1cb334960c
Merge pull request #116591 from gjkim42/add-service-feature-gates-to-e2e_node
Add service-feature-gates argument to node_e2e
2023-03-14 10:41:17 -07:00
Kubernetes Prow Robot
94ed45ab4a
Merge pull request #116568 from pacoxu/fix-alpha-feature-ci
get pvc again to get the pv name that bound to the PVC
2023-03-14 10:41:09 -07:00
Kubernetes Prow Robot
bab2774b21
Merge pull request #116517 from dims/re-organize-remote-e2e-test-to-be-pluggable
re-organize remote e2e test to be pluggable
2023-03-14 10:41:00 -07:00
Kubernetes Prow Robot
25edb4943a
Merge pull request #116465 from sourcelliu/nodeaffinity
Fix PreFilter logic problem in node affinity
2023-03-14 10:40:52 -07:00
Kubernetes Prow Robot
6a111bebe2
Merge pull request #116377 from kinvolk/rata/userns
KEP-127: user namespace support for stateless pods
2023-03-14 10:40:43 -07:00
Kubernetes Prow Robot
480a0c2c36
Merge pull request #116353 from KnVerey/applyset-crd-parents
ApplySet: allow custom resources to be parent objects
2023-03-14 10:40:36 -07:00
Kubernetes Prow Robot
4950f51903
Merge pull request #116155 from enj/enj/f/dek_reuse
kmsv2: re-use DEK while key ID is unchanged
2023-03-14 10:40:28 -07:00
Kubernetes Prow Robot
49649c89ea
Merge pull request #113584 from yangjunmyfm192085/volume-contextual-logging
volume: use contextual logging
2023-03-14 10:40:16 -07:00
Moshe Levi
67a71c0bd7 kubelet podresources: add unit tests for DyanmicResource and Get method
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:04 +02:00
Moshe Levi
2a568bcfc8 kubelet podresources: extend List to support Dynamic Resources and implement Get API
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:04 +02:00
Moshe Levi
9c57613912 Add ClassName to chekpoint state and in-memory cache
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:04 +02:00
Moshe Levi
71d6e4d53c kubelet metrics: add pod resources get metrics
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:03 +02:00
Moshe Levi
91234c701e kube features: add KubeletPodResourcesDynamicResources and KubeletPodResourcesGet
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-14 19:33:03 +02:00
Francesco Romani
5e03998991 kubelet: podresources: pack parameters in a struct
To enable rate limiting, needed for GA graduation,
we need to pass more parameters to the already crowded
`ListenAndServePodresources` function.

To tidy up a bit, pack the parameters in a helper struct,
with no intended changes in behavior.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-03-14 19:33:01 +02:00
justinsb
04ae8e9b2e kubectl prunev2: simple e2e/integration test
Starting with the most basic e2e test, checking that we can create and
prune configmaps.
2023-03-14 16:45:29 +00:00
Humble Chirammal
0bdb2db18d update internal type of csiNodeExpand feature to beta
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-03-14 22:12:17 +05:30
natasha41575
09e6e4db1d Update kubectl kustomize to kyaml/v0.14.1, cmd/config/v0.11.1, api/v0.13.2, kustomize/v5.0.1 2023-03-14 11:40:28 -05:00
Kubernetes Prow Robot
e660a1702b
Merge pull request #116571 from mengjiao-liu/scheduler-plugins-defaultbinder
Migrate pkg/scheduler/framework/plugins/defaultbinder to contextual logging
2023-03-14 09:39:59 -07:00
Kubernetes Prow Robot
e192a7dbcc
Merge pull request #116330 from SataQiu/clean-kubelet-20230307
Followup 112643: remove residual code associated with DynamicKubeletConfig
2023-03-14 09:39:51 -07:00
Kensei Nakada
b49b34c03a
HPA: expose the metrics "reconciliations_total" and "reconciliation_duration_seconds" from HPA controller (#116010) 2023-03-14 09:39:42 -07:00
Kubernetes Prow Robot
c2ad27aaa2
Merge pull request #115619 from jprzychodzen/cluster-kcm-ccm
[GCE] [cluster] Split run controllers per controller-manager
2023-03-14 09:39:34 -07:00
Kubernetes Prow Robot
cb5ad1e044
Merge pull request #115576 from silenceshell/fix-fake-os-files-concurrent-map-write
fix concurrent-map-write of FakeOS.Create
2023-03-14 09:39:26 -07:00
Kubernetes Prow Robot
8bf7805e05
Merge pull request #115397 from sourcelliu/boottime
Add test for pkg/kubelet/util
2023-03-14 09:39:18 -07:00
Kubernetes Prow Robot
af97bb9ac5
Merge pull request #115053 from qingwave/remove-unuse-code
Remove unuse code in pkg/kubelet/util
2023-03-14 09:39:10 -07:00
Kubernetes Prow Robot
898143a96a
Merge pull request #114904 from TommyStarK/kubelet/pod_startup_latency_tracker
kubelet: fix recording when pulling image did finish
2023-03-14 09:39:02 -07:00
Kubernetes Prow Robot
aa49f001bc
Merge pull request #114701 from goushicui/vlm
update comment
2023-03-14 09:38:53 -07:00