-
Notifications
You must be signed in to change notification settings - Fork 107
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
Make the kubelet root directory configurable #1438
Make the kubelet root directory configurable #1438
Conversation
/assign @saschagrunert |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1438 +/- ##
==========================================
- Coverage 44.13% 44.05% -0.08%
==========================================
Files 50 50
Lines 5651 5661 +10
==========================================
Hits 2494 2494
- Misses 3037 3047 +10
Partials 120 120 |
/retest |
/test all |
/retest |
03d5954
to
0989402
Compare
/retest |
## Configure a custom kubelet root directory | ||
|
||
You can configure a custom kubelet root directory in case your cluster is not using the default `/var/lib/kubelet` path. | ||
You can achieve this by setting the environment variable `KUBELET_DIR` in the operator deployment. This environment variable will | ||
be then set in the manager container as well as it will be propagated into the containers part of spod daemonset. |
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.
Would it be better / possible to have this as part of the SPOD instance?
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.
The challenge is that the kubelet path is required in the non-root enabler sidecar which currently doesn't read any SPOD CRD before copying the profiles into the kubelet directory.
It seems to be used inside of nodestatus controller as well.
The idea is to have this environment variable propagated everywhere that all components used the same custom kubelet directory including both manager and daemon instances.
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.
Alright, make sense. Any further thoughts on that @kubernetes-sigs/security-profiles-operator-maintainers ?
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.
Relying on env-vars would make it a lot easier to enable support for non symmetrical configuration across node pools. +1 from me on the approach.
## Configure a custom kubelet root directory | ||
|
||
You can configure a custom kubelet root directory in case your cluster is not using the default `/var/lib/kubelet` path. | ||
You can achieve this by setting the environment variable `KUBELET_DIR` in the operator deployment. This environment variable will | ||
be then set in the manager container as well as it will be propagated into the containers part of spod daemonset. |
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.
Relying on env-vars would make it a lot easier to enable support for non symmetrical configuration across node pools. +1 from me on the approach.
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.
Two nits, apart from that it looks good to me.
@pjbgf Thanks for review! I addressed your comments. |
c200170
to
bfa94b6
Compare
/test all |
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.
/lgtm
@saschagrunert it seems that are some recent changes in the The fix is in this commit 7932975 |
/test all |
2a53c47
to
bfa94b6
Compare
It seems that they fixed the |
The llvm.sh seems to be broken:
|
bfa94b6
to
ddc4231
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ccojocar, pjbgf, 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 |
…igurable kubelet directory
…ll relevant containers
…igure a custom kubelet root directory
ddc4231
to
416302e
Compare
/lgtm |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This makes the kubelet root directory configurable. kubelet has a command option which allows to
configure its root directory. This is the place form where the configuration is loaded, including
the seccomp profiles.
This is useful in a cluster which doesn't use the default
/var/lib/kubelet
path.Which issue(s) this PR fixes:
Does this PR have test?
Yes
Special notes for your reviewer:
Does this PR introduce a user-facing change?