This will be used when generifying client-go: applying
ApplyConfigurations requires extracting their name, which is currently
done by accessing the corresponding public field directly; but that
can't be done with interfaces, which is what have to be used with
generics.
Signed-off-by: Stephen Kitt <skitt@redhat.com>
fixes for the memory manager tests by correctly restoring
the kubelet config after each test. We need to do before all
the related tests run, in order to make sure to restore the
correct values.
Add more debug facilities to troubleshoot further failures.
Signed-off-by: Francesco Romani <fromani@redhat.com>
The node.status.addresses logic grew organically and with weird
semantics, this commit try to document existing semantics when
the kubelet uses an external cloud provider and recover the same
behavior existing pre-1.29.
The node.status.addresses can be populated by the kubelet at startup or
delegated to the external cloud provider.
If the --node-ip flag is set to an IP in the node, the kubelet will add
an annotation to the Node object that will be respected by the external
cloud providers, no new IP addresses will be added for the same address
type.
If the IP set in the --node-ip flag is `0.0.0.0` or `::`, the kubelet
will initialize the node with the default address of the corresponding
IP family of the unspecified address, and the cloud-provider will override
it later.
e2e_node test depend on very specific shared state (node state).
Pod leakages between tests oftentimes cause the test preconditions
to be silently corrupted, causing hard to debug CI failures.
Use the new facility to annotate pods with test owner (= the
test code which created the test) to help debug these failures.
For more context, please check the conversation in #123468
Signed-off-by: Francesco Romani <fromani@redhat.com>
e2e_node test depend on very specific shared state (node state).
Pod leakages between tests oftentimes cause the test preconditions
to be silently corrupted, causing hard to debug CI failures.
We add the option to add an annotation to pods which records
the code line (source code:line) which triggered the pod creation,
so it becomes easier to track which test needs better cleanup.
The relevant e2e framework code is used in all the e2e suites,
so to minimize any unwanted consequences we make the feature
opt-in, planning to enable it initially (and likely only)
in the e2e_node tests.
Signed-off-by: Francesco Romani <fromani@redhat.com>
**Problem:** When a Pod fails to run due to kubelet-side admission checks, the
v1.Event objects emitted looks like these:
Reason="NodeAffinity" Message="Predicate NodeAffinity failed"
Reason="NodeName" Message="Predicate NodeName failed"
Reason="NodePorts" Message="Predicate NodePorts failed"
**Solution:** Expose human-readable predicate description in the failure
so that kubelet submits an Event with this description, such as:
Reason="NodeAffinity" Message="Predicate NodeAffinity failed: node(s) didn't match Pod's node affinity/selector"
Reason="NodeName" Message="Predicate NodeName failed: node(s) didn't match the requested node name"
Reason="NodePorts" Message="Predicate NodePorts failed: node(s) didn't have free ports for the requested pod ports"
The claim parameter key didn't include the namespace of the claim. In the case
where two namespaces used the exact same parameter reference, the "too many
generated parameters" case got triggered incorrectly and lookup could have
returned an object from the wrong namespace.
Found while running the E2E tests in parallel:
message: 'running PreFilter plugin "DynamicResources": multiple generated claim
parameters for ConfigMap. dra-8794/parameters-3 found: [dra-4729/parameters-4
dra-7328/parameters-4 dra-8794/parameters-4 dra-3402/parameters-4 dra-6156/parameters-4
dra-1839/parameters-4 dra-7434/parameters-4 dra-6504/parameters-4]'
After the introduction of v1beta4 if the user inputs the old
v1beta3 discovery timeout the value is ignored. Fix that
by introducing a conversion to v1beta4.
Co-authored-by: penghez (GitHub handle)