Skip to content

[bitnami/nginx] Feature Request: Allow disabling of automatic initContainers in NGINX chart #32541

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

Closed
vineetguptadev opened this issue Mar 20, 2025 · 4 comments
Assignees
Labels
feature-request nginx solved stale 15 days without activity triage Triage is needed

Comments

@vineetguptadev
Copy link
Contributor

vineetguptadev commented Mar 20, 2025

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:

  1. When containerSecurityContext.readOnlyRootFilesystem is true, it creates a preserve-logs-symlinks initContainer that requires bash and performs filesystem operations
  2. The chart has no way to disable these automatically created initContainers

Issues

This causes problems when:

  1. Running in environments with strict OPA policies that don't allow readOnlyRootFilesystem
  2. Using custom container images that don't include bash and only sh
  3. 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.
@carrodher
Copy link
Member

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 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
Copy link

github-actions bot commented Apr 8, 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.

@github-actions github-actions bot added the stale 15 days without activity label Apr 8, 2025
Copy link

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.

@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 13, 2025
@sleeyax
Copy link

sleeyax commented Apr 13, 2025

Stale bots are the worst. This is still an issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request nginx solved stale 15 days without activity triage Triage is needed
Projects
None yet
Development

No branches or pull requests

5 participants