Closed as not planned
Closed as not planned
Description
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:
- When
containerSecurityContext.readOnlyRootFilesystem
is true, it creates apreserve-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 onlysh
- 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.