-
Notifications
You must be signed in to change notification settings - Fork 53
Support re-using LAPI credentials in Agent and AppSec #266
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
base: main
Are you sure you want to change the base?
Conversation
39b8f6d to
af54fa4
Compare
19c0640 to
32c5f72
Compare
|
While I do enjoy that you tackle the "Let's install packages on container startup" problem, I'm not sure the "let's allow the Pod to patch all Pods in the same namespace" is a good trade. The solution of using an encrypted annotation to store the secret, seems overly complex to me. Other approaches:
|
Hello @SISheogorath. Thank you for your feedback. I have considered using any additional resource but gave up on it due to the following:
I did some investigation to address your concern of a compromised POD and the solution may be to use projected volume for a service account only on init container, with minimal expiration time. That way, whole POD won't get the privileges to patch anything, but init container will, and those permissions will be revoked once init container is finished. |
|
If you want to store the token only for the lifetime of a Pod, it would be easier to use a (memory-backed) emptyDir to store the token. https://kubernetes.io/docs/concepts/storage/volumes/#emptydir-memory-configuration-example Why all the complications with annotating it to the Pod? There is no need to talk to the Kubernetes API if you just store it in an emptyDir that survives until the Node is restarts (memory-backed emptydir) or the pod is deleted (regular emptyDir). |
Well this is embarrassing. POD actually uses tmpDir, I just had to check if the tmpdir was written to before attempting to register. Thanks for the hint and feedback, the solution became much more simple :) |
|
Hello @blotus and @sabban. This MR became much more simpler after addressing feedback from @SISheogorath. Would you please take a look and maybe finally merge it? Thanks |
Check beforehand if tmp dir contains the config file and try to re-use it
Fixes: #252
/kind enhancement
/area configuration