Skip to content
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

[BUG][OpenSearch] Init container running as root #656

Open
samjohnsonCF opened this issue Feb 25, 2025 · 5 comments
Open

[BUG][OpenSearch] Init container running as root #656

samjohnsonCF opened this issue Feb 25, 2025 · 5 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers Mend: configuration error Mend configuration error

Comments

@samjohnsonCF
Copy link

Describe the bug
In the opensearch helm chart there are 2 init containers running as root (user 0). The fsgroup-volume and the sysctl. These two init containers can be modified to run as user 1000 / group 1000 and will then no longer need to run as 0.
These security contexts should ultimately be able to be modified/controlled via the values file for easier modifications.

To Reproduce
N/A

Expected behavior
Init containers should not be running as root.

Chart Name
Opensearch (statefulset.yaml)

Screenshots

Image

Host/Environment (please complete the following information):

  • Helm Version: v3.15.1
  • Kubernetes Version: 1.30.9

Additional context
N/A

@samjohnsonCF samjohnsonCF added bug Something isn't working untriaged Issues that have not yet been triaged labels Feb 25, 2025
@Sunilwali679
Copy link

@samjohnsonCF could you please assign this issue to me ?

@samjohnsonCF
Copy link
Author

Hi @Sunilwali679 ! It doesn't look like I can actually assign it to anyone.. unless I'm missing something. But the "Assignees" at the top right is not editable by me.

@DandyDeveloper DandyDeveloper added good first issue Good for newcomers Mend: configuration error Mend configuration error and removed untriaged Issues that have not yet been triaged labels Mar 4, 2025
@DandyDeveloper
Copy link
Collaborator

Definitely would prefer the defaults step away from using root, should not be necessary. Defaults should be "catch all" minimum access needed, and expose it so users can change this .

@samjohnsonCF
Copy link
Author

Agreed! I've been doing this on my own implementation of opensearch. I got the fsgroup-volume init container working by running as user 1000 and group 1000 and by adding the CHOWN capability. I so far have not been successful on getting the systcl command to run outside of root user.

@Sunilwali679
Copy link

thanks @DandyDeveloper @samjohnsonCF :) I will raise PR ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers Mend: configuration error Mend configuration error
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants