-
Notifications
You must be signed in to change notification settings - Fork 125
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
Configuration option to support deployment with K8s readOnlyRootFilesystem security context #613
Comments
First thing is to make each file mountable, and then the second thing is to make it either default or create a kustomization to actually run ironic-image with read-only filesystem. This then required adding some
This is going to be annoying as in /bin we have liveness and readiness probes, whose path is defined in BMO manifests.
This is pretty weird one as well. Why are we writing here?
These two are the most important ones to move into subdirectories. The other config files already are. |
So dividing the response here to a few parts;
|
I think the goal is worth the effort, but I have reservations about adding a new non-default mode of operation. Especially in the bash-based ironic-image, it's going to increase the maintenance burden. How is the new mode going to be tested? If it's something that you only use downstream, we're going to regress eventually. |
The only reason I have decided to introduce the feature as a non default option was to not overburden the community and as other communities e.g. Ironic is also using this image I wanted to avoid backward incompatibility. From my POV I have no objection making the new mode of operation the default or the only one. But before I would make this new feature a default I would really like to have a community consensus (fine if it is a lazy one) on how to roll this out. I would prefer to introduce it first as optional then e.g. 1 release later it would become the default then yet an other release later it would be the only way to manage config files. Also after our discussion about @lentzi90 's old proposal , I think the two proposals compliment each other very nicely and I could implement that as a next step also. |
My proposal would be placing template (source) files in directories where they can be left read-only and always, regardless of target directories are mounts or not, write them into target directories. It is backwards compatible way and allow the user flexibility of using it or not using it. (Disclaimer: I did not check yet what we're actually modifying in paths like For example:
This way we:
|
This sounds good but based on my test we can get away with 1 directory for all the config files, and I would advocate for 1 location for all the config files with 1 mounted volume backing it . So I think I can incorporate the fix paths but not in /etc or such places but under e.g. /mnt/cfg for example. Maybe even /etc/ironic-image-cfg/ would work I have to test how does this security context react if I mount something "under" the read only root file system so like under /etc/something if the /etc/somthing is already present. Anyhow I already have code I am testing it now, I think it will be easier to discuss this when I have code example to show. |
I mean it is a choice and we just need to decide what we want to prioritize. |
I would also favor making this the default/only option. It is a best practice for a reason so I don't see why we would avoid it.
This should work well and is a common practice. I don't have a strong preference if we put it separate (e.g. /config) or mixed in under /etc. |
/triage accepted |
This proposal is aimed to introduce an optional new way to handle configuration generation at deployment time.
This proposal does not aim to change the default behavior of the ironic-image.
This new feature would be implemented as at least 1 new environment variable that could result in a different way of rendering the different configuration files. The configuration files would be moved to a path designated by the new configuration variable and no file writing operation would take place on the container's own file system.
Requirements for users:
Impact:
Unknowns
The impact has to be considered in the context of a K8s pod so because of the "run scripts" of Ironic the impact on a individual container level will be smaller but if all the effected paths of all the possible Ironic container deployments are congregated we will have the above described impact.
Non goals
Additional goals discovered during issue discussion
The text was updated successfully, but these errors were encountered: