-
Notifications
You must be signed in to change notification settings - Fork 1.1k
server,factory/container: delay CDI device injection later. #9292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server,factory/container: delay CDI device injection later. #9292
Conversation
9fca08f
to
1c81c93
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9292 +/- ##
==========================================
+ Coverage 66.91% 66.98% +0.07%
==========================================
Files 198 198
Lines 27190 27194 +4
==========================================
+ Hits 18193 18217 +24
+ Misses 7494 7478 -16
+ Partials 1503 1499 -4 🚀 New features to boost your workflow:
|
/override ci/prow/ci-e2e-evented-pleg LGTM thanks! @cri-o/cri-o-maintainers PTAL |
@haircommander: Overrode contexts on behalf of haircommander: ci/prow/ci-e2e-evented-pleg In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Use a few environment variables with default values to verify that evironment variables from CDI injection take precedence over ones in the Pod Spec. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Currently CDI device injection is performed right after injecting other devices into the container. This is problematic because CDI device injection might alter, among other things, the environment. However setting up the final environment happens only later during container creation and it involves setting environment variables from the image and the Pod Spec. If the same environment variable is injected both from an image or a container, and from a CDI Spec, now the former take precedence of the latter. This is unintentional and wrong. This patch moves CDI device injection much later during container creation, between OCI Hook injection and *oci.Container creation. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
1c81c93
to
64a94f2
Compare
@klihub: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, klihub, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Currently CDI device injection is performed right after injecting other devices into the container. This is problematic because CDI device injection might alter, among other things, the environment. However setting up the final environment happens only later during container creation and it involves setting environment variables from the image and the Pod Spec. If the same environment variable is injected both from an image or a container, and from a CDI Spec, now the former take precedence of the latter. This is unintentional and wrong.
This patch moves CDI device injection much later during container creation, between OCI Hook injection and *oci.Container creation.
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
Does this PR introduce a user-facing change?