Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for InitContainers in the charts #979

Closed
MohamedZ3kri opened this issue Mar 29, 2023 · 4 comments
Closed

Add support for InitContainers in the charts #979

MohamedZ3kri opened this issue Mar 29, 2023 · 4 comments

Comments

@MohamedZ3kri
Copy link

MohamedZ3kri commented Mar 29, 2023

Is your feature request related to a problem?

no

Which solution do you suggest?

Update the chart's values.yaml file + templates/statefulset.yaml file to support templating initcontaienrs.

Which alternative solutions exist?

No response

Additional context

This can have multiple use cases, I need this to place some custom certificates (read from secrets) under /data/server/tls before the server's initial start.

@FabianKramm
Copy link
Member

FabianKramm commented Apr 3, 2023

Hey @MohamedZ3kri ! You should be able to mount these via regular ConfigMaps / Secrets, which is usually a better approach than using init containers. In general we could think about such an option though.

@MohamedZ3kri
Copy link
Author

Unfortunately regular ConfigMaps / Secrets won't work, I'm trying to mount the certificates based on the solution described here, If I mount the configmap directly under /data/server/tls I get a read-only file system error.

level=fatal msg="starting kubernetes: preparing server: open /data/server/tls/client-ca.nochain.crt: read-only file system"

@FabianKramm
Copy link
Member

@MohamedZ3kri do you mount the complete folder? I guess you need to mount the individual files only as k3s is trying to write other things into the folder

@MohamedZ3kri
Copy link
Author

yes mounting the 6 files separately solved the read-only file system error, thank you.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants