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

[enterprise-logs] Make fsGroup configurable for deploying admin-api on OpenShift #922

Closed
basvdl opened this issue Dec 29, 2021 · 5 comments · Fixed by #957
Closed

[enterprise-logs] Make fsGroup configurable for deploying admin-api on OpenShift #922

basvdl opened this issue Dec 29, 2021 · 5 comments · Fixed by #957

Comments

@basvdl
Copy link
Contributor

basvdl commented Dec 29, 2021

In order to deploy on OpenShift we need to be able to configure the fsGroup for the admin-api deployment.

https://github.com/grafana/helm-charts/blob/main/charts/enterprise-logs/templates/admin-api/deployment-admin-api.yaml#L45

Add same logic seen in the other deployments, to make the security context configurable via the users values.yaml.

@ssncferreira
Copy link
Contributor

ssncferreira commented Jan 7, 2022

@basvdl by looking at the values.yaml file, the Admin API fsGroup is not configurable due to the following:

# -- Run container as user `enterprise-logs(uid=10001)`
# `fsGroup` must not be specified, because these security options are applied
# on container level not on Pod level.
securityContext:
runAsNonRoot: true
runAsGroup: 10001
runAsUser: 10001

This was updated in issue: #687

@chaudum what do you think about this?

@chaudum
Copy link
Contributor

chaudum commented Jan 11, 2022

@basvdl Could you explain in more detail why this is necessary on OpenShift?

@chaudum
Copy link
Contributor

chaudum commented Jan 11, 2022

Does a simple configurable fsGroup value help in this case? https://github.com/grafana/helm-charts/compare/chaudum/issue-922?expand=1

@basvdl
Copy link
Contributor Author

basvdl commented Jan 11, 2022

@chaudum I'm not an OpenShift expert... But OpenShift uses SecurityContexts which allows a range of uid's that can be used for runAsUser, runAsGroup and fsGroup. During my last GEL deployment on OpenShift, the customer was not able to create a custom SecurityContext and needed to change the fsGroup. We did this after the deployment by manually changing the yaml on the cluster.

The suggested change looks good to me! Thanks!

@ssncferreira ssncferreira linked a pull request Jan 13, 2022 that will close this issue
@ssncferreira
Copy link
Contributor

ssncferreira commented Jan 13, 2022

Closing the issue as a fix was already merged as part of PR #957
Thank you @chaudum for the fix and the help 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants