* Don't evaluate extra nodes if there's no score plugin defined
* Fix existing unit test (add no op scoring plugin)
* Add unit tests for no score plugin scenario
* address review comments
* add a test with non-filter, non-scoring extender
When enabling DynamicResourceAllocation the dynamicresource plugin may
error during scheduling with:
```
E0212 08:57:53.817268 1 framework.go:1323] "Plugin failed" err="podschedulingcontexts.resource.k8s.io \"pod\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>" plugin="DynamicResources" pod="gpu-test2/pod"
```
This allows the state of restartable init containers to be transitioned
from terminated to non-terminated even for pods with RestartPolicyNever
or RestartPolicyOnFailure.
instead of waiting for the periodic loop of the node-controller to
go through all the nodes, use the sync logic to reconcile the node
labels each time that the node has changed after it has been
initialized.
This has the benefit that changes by external entities on this labels
are quickly reconciled.
Change-Id: I45cfc1e3f0b9eefdfdd67267229420d76132ab87
The node controller has two reconcilations loops:
1. workqueue receiving events from watchers, to implement
the node initialization
2. periodic loop to reconcile cloud-provider addresses and
node objects, since there is no watch for the cloud-provider
addresses. However, this loop can take O(xx) mins on large
clusters.
Before the external cloud providers were enabled by default,
the kubelet was in charge of setting the corresponding
providerID and zone and region labels during the node object
creation.
Once this logic was moved to the external cloud providers,
there are cases that the node controller may fail to add the
providerID value on the node object and this is never reconciled.
The problem is that there are many controllers and projects that
depend on this field to be set.
Checking at the code it is not possible to not have a ProviderID
in any cloud-provider, since it is always built from the provider name
and the instance. ProviderID is also inmutable once set, so we make
ProviderID a requirement for node initialization.
To avoid any possible problems, we rollout this change under a feature
gate in deprecated state, so cloud providers can opt-out to the new
behavior.
Change-Id: Ic5d9c23b6a286b12c9721d4a378485a8b81212d1
Change-Id: Iac8c7e7e47a3247553806ed7128b273bbef0a30b
very simple tests to check that the node controllers removes the taint.
Test will be used later for add more coverage without having to depend
on e2e tests for validating complex scenarios and combinations of flags
and controllers.
Change-Id: I55ce01488352cce9d673585e7959678c2bfb5924
- Increase the global level for broadcaster's logging to 3 so that users can ignore event messages by lowering the logging level. It reduces information noise.
- Making sure the context is properly injected into the broadcaster, this will allow the -v flag value to be used also in that broadcaster, rather than the above global value.
- test: use cancellation from ktesting
- golangci-hints: checked error return value
Extending the duration and the allowed delta in f6682370b1 was still not enough
to make the unit test run reliably in pull-kubernetes-unit.
Now it uses the original, stricter timing again, but only when run locally. In
Prow (detected by checking the "CI" env variable), the duration check is
skipped.