-
Notifications
You must be signed in to change notification settings - Fork 112
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
Use PodResources mount as a path instead of file #1674
base: main
Are you sure you want to change the base?
Conversation
12751ee
to
bdc2433
Compare
df9c058
to
0327b63
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1674 +/- ##
==========================================
+ Coverage 49.32% 49.66% +0.34%
==========================================
Files 218 218
Lines 21171 21451 +280
==========================================
+ Hits 10442 10654 +212
- Misses 10184 10247 +63
- Partials 545 550 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker: could we also envision a test to check a custom provided path (e.g. spec.global.podResourcesSocketPath= /foo/bar
) ?
}) | ||
|
||
podResourcesVol, podResourcesMount := volume.GetVolumes(v2alpha1.KubeletPodResourcesVolumeName, config.Kubelet.PodResourcesSocket, config.Kubelet.PodResourcesSocket, false) | ||
podResourcesVol, podResourcesMount := volume.GetVolumes(v2alpha1.KubeletPodResourcesVolumeName, config.Kubelet.PodResourcesSocketDir, config.Kubelet.PodResourcesSocketDir, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
podResourcesVol, podResourcesMount := volume.GetVolumes(v2alpha1.KubeletPodResourcesVolumeName, config.Kubelet.PodResourcesSocketDir, config.Kubelet.PodResourcesSocketDir, false) | |
podResourcesVol, podResourcesMount := volume.GetVolumes(v2alpha1.KubeletPodResourcesVolumeName, config.Kubelet.PodResourcesSocketDir, config.Kubelet.PodResourcesSocketDir, true) |
Could we use readOnly: true
on this volume or that prevents from communicating with the socket ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my testing it prevented communication, yes.
What does this PR do?
This PR fixes the PodResources socket mount introduced in #1650. By using a file mount directly, if kubelet restarts and recreates the socket, the container will not see the new socket and will keep the reference to the old one, thus losing the connection.
Motivation
Fix a bug with kubelet restarts.
Additional Notes
Minimum Agent Versions
No changes w.r.t #1650
Describe your test plan
Unit tests should reflect the new change in mounts.
Checklist
bug
,enhancement
,refactoring
,documentation
,tooling
, and/ordependencies
qa/skip-qa
label