You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The NGINX chart automatically creates initContainers under certain conditions:
When containerSecurityContext.readOnlyRootFilesystem is true, it creates a preserve-logs-symlinks initContainer that requires bash and performs filesystem operations
The chart has no way to disable these automatically created initContainers
Issues
This causes problems when:
Running in environments with strict OPA policies that don't allow readOnlyRootFilesystem
Using custom container images that don't include bash and only sh
Needing to completely disable the log preservation mechanism
Desired Behavior
Add a new configuration option like disableDefaultInitContainers: false (default) that when set to true would skip the automatically generated initContainers while still allowing custom ones via .Values.initContainers.
Suggested Implementation
Modify the conditional statements in deployment.yaml:
{{- if and (not .Values.disableDefaultInitContainers) (or .Values.containerSecurityContext.readOnlyRootFilesystem .Values.cloneStaticSiteFromGit.enabled .Values.initContainers) }}initContainers:
{{- if and (not .Values.disableDefaultInitContainers) .Values.containerSecurityContext.readOnlyRootFilesystem }}
- name: preserve-logs-symlinks...{{- end }}### What is the feature you are proposing to solve the problem?A configuration flag disableDefaultInitContainers: true|false (defaulting to false) that allows users to completely skip the automatically created initContainers in the NGINX chart, particularly the preserve-logs-symlinks initContainer that's generated when containerSecurityContext.readOnlyRootFilesystem is true. This would allow users with strict OPA policies or custom images without bash to still use the chart without having to fork it.
The text was updated successfully, but these errors were encountered:
Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.
Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.
vineetguptadev
changed the title
Feature Request: Allow disabling of automatic initContainers in NGINX chart
[bitnami/nginx] Feature Request: Allow disabling of automatic initContainers in NGINX chart
Mar 23, 2025
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.
Name and Version
bitnami/nginx 19.0.2
What is the problem this feature will solve?
Description:
Current Behavior
The NGINX chart automatically creates initContainers under certain conditions:
containerSecurityContext.readOnlyRootFilesystem
is true, it creates apreserve-logs-symlinks
initContainer that requires bash and performs filesystem operationsIssues
This causes problems when:
bash
and onlysh
Desired Behavior
Add a new configuration option like
disableDefaultInitContainers: false
(default) that when set totrue
would skip the automatically generated initContainers while still allowing custom ones via.Values.initContainers
.Suggested Implementation
Modify the conditional statements in deployment.yaml:
The text was updated successfully, but these errors were encountered: