1. Decoding map with duplicate keys into struct or map produces error.
2. Decoding a map into a Go struct matches json field tag names case-sensitively.
3. When decoding a map into a Go struct, a case-insensitive match between a key and a json field tag
name is treated the same as no match.
Signed-off-by: Vu Dinh <vudinh@outlook.com>
* Make explicit check in CronJob if Job is successful
before setting LastSuccessfulTime
* Review remarks for the CronJob
Co-authored-by: Filip Křepinský <fkrepins@redhat.com>
---------
Co-authored-by: Filip Křepinský <fkrepins@redhat.com>
We just added some more functionality, let's make sure it works fine
with the feature gate disabled.
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
block the creation of a pod that requires a user namespace, unless the
runtime handler has support for it.
If the pod requested for a user namespace, and the handler does not
support it then return an error regardless of the feature gate.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* 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