Currently, when container-level resource limits were not specified and
the Downward API was used to set environment variables referencing them,
the node's allocatable resources were used as the fallback.
With the introduction of the Pod Level Resources feature, this behavior
is updated: if container-level resource limits are not specified,
the Downward API now uses the pod-level resource limits instead.
If neither container-level nor pod-level resource limits are specified,
the behavior remains unchanged. It falls back to the node's allocatable
resources.
Signed-off-by: Tsubasa Nagasawa <toversus2357@gmail.com>
The sig-node tests have scenarios of doing probes and
lifecycle handler tests with post-start and pre-stop hooks
setting the host field to be another pod.
In baseline level such things won't be allowed because of
the PSA rules we are adding in this PR. So unsetting
the host field means it uses the podIP of self for doing
the checks and using that in the pre-stop and post-start
hooks is tricky because of the timing issues with when the
container is actually up v/s running the test.
So I have changed the tests to be privileded for them to
use the .host fields if they desire to.
See https://github.com/kubernetes/kubernetes/issues/133091
which is an issue opened to properly refactor these tests.
Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
* Add FileKeyRef field and struct to the Pod API
* Add the implementation code in the kubelet.
* Add validation code
* Add basic functionality e2e tests
* add codes for drop disabled pod fields
* update go.mod
as the containers in a pod restart, the pod may enter exponential backoff, which delays the pod being ready.
In this case for this pod, it's expected, but we shouldn't fail to continue the test before the container has been given the chance to start again
Signed-off-by: Peter Hunt <pehunt@redhat.com>
there are many cases of an e2e feature being the main filtering mechanism for a test.
However, this makes it tricky for suite authors to filter tests based on available features.
This mechanism is still useful for e.g. making sure a runtime on a suite is of the correct level,
but in general we should both label tests with the Feature set they require (whether runtime is correct) as well
as the feature gates they test.
Signed-off-by: Peter Hunt <pehunt@redhat.com>
This commit updates pod resize tests to resolve an
issue where extraneous unused namespaces are created
when the tests are run. This happens because a new
instance of the test framework is generated when
looping over the test specs, registering BeforeEach each
time.