Commit Graph

113108 Commits

Author SHA1 Message Date
Clayton Coleman
34bfdc3635
wait: ExponentialBackoffWithContext should take context-aware fn
The condition methods will eventually all take a context. Since we
have been provided one, alter the accepted condition type and
change the four references in tree.

Collers of ExponentialBackoffWithContext should use a condition
aware function (ConditionWithContextFunc). If the context can be
ignored the helper ConditionFunc.WithContext can be used to convert
an existing function to the new type.
2023-01-16 14:57:57 -05:00
Kubernetes Prow Robot
7b01daba71
Merge pull request #115074 from yangjunmyfm192085/deleteklogv0-controller
use klog instead of klog.V(0)--controller manager part
2023-01-16 09:58:50 -08:00
Kubernetes Prow Robot
62d7937b2e
Merge pull request #115046 from pacoxu/default-container-e2e
add e2e test for kubectl default container annotation
2023-01-16 08:42:50 -08:00
Paco Xu
b45f0a8def move kubectl log e2e to new file & add e2e test for kubectl default container annotation
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-01-16 21:29:43 +08:00
Kubernetes Prow Robot
ed8cad1e80
Merge pull request #115056 from mimowo/podgc-do-not-add-condition-for-terminated-pods
PodGC should not add DisruptionTarget condition for pods which are in terminal phase
2023-01-16 03:04:50 -08:00
Kubernetes Prow Robot
4c4d4ad0a4
Merge pull request #115077 from smarterclayton/reflector_mock_clock
cache: Reflector should have the same injected clock as its informer
2023-01-15 17:24:49 -08:00
Kubernetes Prow Robot
3613ed04b6
Merge pull request #115079 from dims/update-to-newer-moby/ipvs-v1.1.0
Update to new release of moby/ipvs
2023-01-15 13:30:49 -08:00
Kubernetes Prow Robot
da6a8e3fe9
Merge pull request #115069 from alexzielenski/grep-null
use --null instead of -Z in grep invocation
2023-01-15 07:30:42 -08:00
Kubernetes Prow Robot
fd885b751d
Merge pull request #115068 from neolit123/revert-115000-feature/UpdateOrCreateTokenAddErrProcessing
Revert "UpdateOrCreateToken get secrets err handling optimization"
2023-01-15 07:30:31 -08:00
Davanum Srinivas
d9b98bc36a
Update to new release of moby/ipvs
hack/pin-dependency.sh github.com/moby/ipvs v1.1.0

- go to a fixed tag for `vishvananda/netns`
- no more references to `pkg/errors`

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-01-14 16:13:24 -05:00
Clayton Coleman
91b3a81fbd
cache: Reflector should have the same injected clock as its informer
While refactoring the backoff manager to simplify and unify the code
in wait a race condition was encountered in
TestSharedInformerWatchDisruption. The new implementation failed
because the fake clock was not propagated to the backoff managers
when the reflector was used in a controller. After ensuring the
mangaers, reflector, controller, and informer shared the same
clock the test needed was updated to avoid the race condition by
advancing the fake clock and adding real sleeps to wait for
asynchronous propagation of the various goroutines in the controller.

Due to the deep structure of informers it is difficult to inject
hooks to avoid having to perform sleeps. At a minimum the FakeClock
interface should allow a caller to determine the number of waiting
timers (to avoid the first sleep).
2023-01-14 14:50:09 -05:00
JunYang
29086e2b04 use klog instead of klog.V(0) 2023-01-14 21:15:50 +08:00
Kubernetes Prow Robot
eabb70833a
Merge pull request #114896 from kidddddddddddddddddddddd/volume_zone
feature(volume_zone): return Skip in PreFilter
2023-01-13 23:14:13 -08:00
Kubernetes Prow Robot
3a8e2e399b
Merge pull request #114393 from danielvegamyhre/myfeature
Option to ignore existing pods' preferred inter-pod affinities if the incoming pod has no preferred inter-pod affinities
2023-01-13 17:28:15 -08:00
Alexander Zielenski
63f109e149 use --null instead of -Z in grep invocation
BSD grep has a different behavior from GNU grep with -Z.

--null has consistent behavior accross both implementations
2023-01-13 15:31:05 -08:00
Daniel Vega-Myhre
41817b1888 optionally ignore preferred terms of existing pods unless incoming pod
has inter-pod affinities
2023-01-13 23:15:53 +00:00
Lubomir I. Ivanov
7938631e22
Revert "UpdateOrCreateToken get secrets err handling optimization" 2023-01-14 00:11:49 +02:00
Kubernetes Prow Robot
2ca95b4df9
Merge pull request #115035 from xing-yang/update_plugin_warning
Update warnings for removed in-tree plugins
2023-01-13 12:08:26 -08:00
Kubernetes Prow Robot
9af5ae0365
Merge pull request #115030 from kannon92/remove-pod-error-job-tracking
Update SyncJob with PodControllerError updates in job unit tests
2023-01-13 12:08:14 -08:00
Kubernetes Prow Robot
70217a4083
Merge pull request #114944 from mimowo/fix-active-deadline-test
Fix the job controller unit test for enforcing ActiveDeadlineSeconds
2023-01-13 10:46:26 -08:00
Michal Wozniak
3833c0c349 PodGC should not add DisruptionTarget condition for pods which are in terminal phase 2023-01-13 18:28:44 +01:00
Kubernetes Prow Robot
e51fe4a61c
Merge pull request #114492 from SataQiu/update-prefered-storageversion-20221215
apiserver: update serialization version priority for flowcontrol API
2023-01-13 08:42:24 -08:00
kannon92
3a838033f8 Update SyncJob with PodControllerError updates in job unit tests 2023-01-13 16:39:18 +00:00
Michal Wozniak
7065b42bb2 Fix the job controller unit test for enforcing ActiveDeadlineSeconds 2023-01-13 16:48:15 +01:00
Kubernetes Prow Robot
c0c386b9c9
Merge pull request #114516 from nikhita/job-backoff-fix
pkg/controller/job: re-honor exponential backoff delay
2023-01-13 07:36:40 -08:00
Kubernetes Prow Robot
696701b9fd
Merge pull request #114086 from xmcqueen/113935
block ephemeral container addition to static pods
2023-01-13 07:36:28 -08:00
SataQiu
950c147db5 apiserver: update serialization version priority for flowcontrol API 2023-01-13 22:19:39 +08:00
Kubernetes Prow Robot
a66aad2d80
Merge pull request #115000 from helen-frank/feature/UpdateOrCreateTokenAddErrProcessing
UpdateOrCreateToken get secrets err handling optimization
2023-01-12 19:57:12 -08:00
Kubernetes Prow Robot
5323d9213a
Merge pull request #115039 from apelisse/remove-dependency-fieldmanager
fieldmanager: remove dependencies on internal
2023-01-12 17:15:11 -08:00
Kubernetes Prow Robot
cc9cc4d3ea
Merge pull request #114794 from lavalamp/improved-has-synced
Do not N^2 loading webhook configurations
2023-01-12 16:03:24 -08:00
Kubernetes Prow Robot
067fc449cd
Merge pull request #114260 from aojea/kubeproxylagtimeout
be more strict on e2e network timeouts
2023-01-12 16:03:12 -08:00
Kubernetes Prow Robot
6ce055d62d
Merge pull request #114947 from saschagrunert/seccomp-ga-cleanup
Make seccomp annotations non-functional
2023-01-12 13:48:54 -08:00
Antoine Pelisse
d13b405307 fieldmanager: remove dependencies on internal
Remove dependencies on internal fieldmanager for admission things. This
is preparing for moving fieldmanager out, but the admission part will
stay here, so it can't depend directly on internal.
2023-01-12 13:32:54 -08:00
xing-yang
07a1bc5b3e Update warnings for removed in-tree plugins 2023-01-12 16:25:00 -05:00
Daniel Smith
5a1091d88d Fix N^2 startup for webhook configurations
Add a "lazy" type to track when an update is needed. It uses a nested
locking technique to avoid extra evaluation calls.
2023-01-12 21:00:22 +00:00
Kubernetes Prow Robot
e3ae946902
Merge pull request #115029 from cpanato/update-prombot
update publishing rules to use go1.19.5
2023-01-12 12:43:05 -08:00
Kubernetes Prow Robot
1b8692ce46
Merge pull request #114296 from cbroglie/concurrent-monitor-node-health
controller/nodelifecycle: Make monitorNodeHealth process nodes concurrently
2023-01-12 12:42:54 -08:00
Kubernetes Prow Robot
2b69bec35d
Merge pull request #114901 from SataQiu/fix-lint-error-20230108
Fix gocritic lint errors for cmd/kubeadm/*
2023-01-12 09:05:06 -08:00
Kubernetes Prow Robot
3e049c5e68
Merge pull request #114883 from bobbypage/cadvisor_v047
deps: Bump cAdvisor to v0.47.1
2023-01-12 09:04:54 -08:00
cpanato
8338deb4e9
update publishing rules to use go1.19.5
Signed-off-by: cpanato <ctadeu@gmail.com>
2023-01-12 17:18:25 +01:00
Sascha Grunert
af1f6a230b
Make seccomp annotations non-functional
This cleanup has been planned to finish the corresponding KEP:
https://github.com/kubernetes/kubernetes/issues/91286

As follow-up on the partly removal of the seccomp annotations in
https://github.com/kubernetes/kubernetes/pull/109819, we now drop
the version skew handling completely, but still warn as well as keep
the validation in place if both (annotation and field) are set.

The Pod Security Admission code has been already changed in
https://github.com/kubernetes/kubernetes/pull/114846.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-01-12 17:11:52 +01:00
Kubernetes Prow Robot
4802d7bb62
Merge pull request #114766 from MadhavJivrajani/prepare-for-go1.20
[Prepare for go1.20] *: Bump versions and fix tests
2023-01-12 07:10:54 -08:00
Nikhita Raghunath
fd8d92a29d pkg/controller/job: re-honor exponential backoff
This commit makes the job controller re-honor exponential backoff for
failed pods. Before this commit, the controller created pods without any
backoff. This is a regression because the controller used to
create pods with an exponential backoff delay before (10s, 20s, 40s ...).

The issue occurs only when the JobTrackingWithFinalizers feature is
enabled (which is enabled by default right now). With this feature, we
get an extra pod update event when the finalizer of a failed pod is
removed.

Note that the pod failure detection and new pod creation happen in the
same reconcile loop so the 2nd pod is created immediately after the 1st
pod fails. The backoff is only applied on 2nd pod failure, which means
that the 3rd pod created 10s after the 2nd pod, 4th pod is created 20s
after the 3rd pod and so on.

This commit fixes a few bugs:

1. Right now, each time `uncounted != nil` and the job does not see a
_new_ failure, `forget` is set to true and the job is removed from the
queue. Which means that this condition is also triggered each time the
finalizer for a failed pod is removed and `NumRequeues` is reset, which
results in a backoff of 0s.

2. Updates `updatePod` to only apply backoff when we see a particular
pod failed for the first time. This is necessary to ensure that the
controller does not apply backoff when it sees a pod update event
for finalizer removal of a failed pod.

3. If `JobsReadyPods` feature is enabled and backoff is 0s, the job is
now enqueued after `podUpdateBatchPeriod` seconds, instead of 0s. The
unit test for this check also had a few bugs:
    - `DefaultJobBackOff` is overwritten to 0 in certain unit tests,
    which meant that `DefaultJobBackOff` was considered to be 0,
    effectively not running any meaningful checks.
    - `JobsReadyPods` was not enabled for test cases that ran tests
    which required the feature gate to be enabled.
    - The check for expected and actual backoff had incorrect
    calculations.
2023-01-12 20:34:10 +05:30
Kubernetes Prow Robot
0ff0d0b94e
Merge pull request #115010 from cpanato/go119-main
releng: Update images, dependencies and version to Go 1.19.5
2023-01-12 06:00:54 -08:00
helen
e6591d24ce when UpdateOrCreateTokens get secrets, if the error is not a NotFound, the error is thrown in time
Signed-off-by: helen <haitao.zhang@daocloud.io>
2023-01-12 20:50:02 +08:00
cpanato
eb38f1508a
releng: Update images, dependencies and version to Go 1.19.5
Signed-off-by: cpanato <ctadeu@gmail.com>
2023-01-12 13:43:57 +01:00
Kubernetes Prow Robot
457341c3d4
Merge pull request #114647 from kannon92/remove-legacy-job-tracking-job-controller
Removing Legacy Job Tracking Code
2023-01-12 04:38:53 -08:00
Kubernetes Prow Robot
0d6dc14051
Merge pull request #114783 from pohly/e2e-framework-timeouts
e2e framework: consolidate timeouts and intervals
2023-01-12 03:29:08 -08:00
Kubernetes Prow Robot
5b241820b7
Merge pull request #114417 from chendave/ginkgo_fix_spec
e2e: bring back total test spec for Ginkgo v2
2023-01-12 03:28:56 -08:00
Madhav Jivrajani
c31cc5ec46 vclib: Modify x509.UnknownAuthorityError unwrap check
Modify unwrap error utility to make it work with go1.20
This version of Go introduces a new layer of wrapping via
a new error type. The commit accounts for that while being
compatible with go1.19

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2023-01-12 15:08:56 +05:30