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

Set containerSecurityContext for the dragonfly custom resource #231

Open
geckiss opened this issue Aug 19, 2024 · 0 comments
Open

Set containerSecurityContext for the dragonfly custom resource #231

geckiss opened this issue Aug 19, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@geckiss
Copy link

geckiss commented Aug 19, 2024

Hello,

Right now the dragonfly crd doesn't seem to support setting any containerSecurityContext. Some environments require containers to run under non-root user.
Helm chart already supports this - https://github.com/dragonflydb/dragonfly/blob/1f36c9952dd5537fb004d408ffebc977bc4cce8b/contrib/charts/dragonfly/values.yaml#L42
Would it be possible to add this please? It would be a nice addition together with #229

So we can create something like this:

apiVersion: dragonflydb.io/v1alpha1
kind: Dragonfly
metadata:
  labels:
    app.kubernetes.io/name: dragonfly-sample
    app.kubernetes.io/instance: dragonfly
    app.kubernetes.io/part-of: dragonfly-operator
    app.kubernetes.io/managed-by: helm
    app.kubernetes.io/created-by: dragonfly-operator
  name: dragonfly-sample
spec:
  containerSecurityContext:
    runAsUser: 1000
    runAsNonRoot: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants