dragonflydb / dragonfly-operator

A Kubernetes operator to install and manage Dragonfly instances.
https://www.dragonflydb.io/docs/managing-dragonfly/operator/installation
Apache License 2.0
132 stars 28 forks source link

OpenShift & fsGroup SecurityContext #116

Closed ArthurVardevanyan closed 6 months ago

ArthurVardevanyan commented 11 months ago

This change in Operator 0.0.8 causes the pods to not start start due to OpenShift requiring the use of Random UIDs

OpenShift will inject a given fsGroup for a given namespace: image

REF:

Pothulapati commented 10 months ago

Interesting but Dragonfly binary also requires a specific fsGroup to let the binary inside have the required permissions on volumes. Any ideas on what do you think we should do? We could attach that group only when backups are scheduled but this would still cause this problem when there are backups needed.

ArthurVardevanyan commented 10 months ago

The random UIDs are per namespace not per pod, I wouldn't expect there to be an issue.

Pothulapati commented 9 months ago

So, We are trying to fix this. First, we want to explore how other Operators that also have a fsGroup being set work with Openshift

@ArthurVardevanyan Do you have any ideas on how we should fix this?

ArthurVardevanyan commented 9 months ago

Here is an example from the Crunchy Postgres Operator:

In Code: https://github.com/CrunchyData/postgres-operator/blob/0f8d886f8f2d16b1310255884709e47613a7f115/internal/controller/standalone_pgadmin/pod.go#L360-L362

In Yaml: https://github.com/ArthurVardevanyan/HomeLab/blob/production/kubernetes/quay/base/postgres/quay/postgres.yaml#L118

ArthurVardevanyan commented 6 months ago

PR: https://github.com/dragonflydb/dragonfly-operator/pull/163

Pothulapati commented 6 months ago

163 merged, hence closing!