OT-CONTAINER-KIT / redis-operator

A golang based redis operator that will make/oversee Redis standalone/cluster/replication/sentinel mode setup on top of the Kubernetes.
https://ot-redis-operator.netlify.app/
Apache License 2.0
731 stars 206 forks source link

Can't apply containerSecurityContext to other containers than redis #978

Closed ifalex closed 2 weeks ago

ifalex commented 2 weeks ago

What version of redis operator are you using?

kubectl logs <_redis-operator_pod_name> -n <namespace>
{"level":"info","ts":"2024-06-09T18:26:51Z","logger":"controllers.RedisReplication","msg":"Reconciling opstree redis replication controller","Request.Namespace":"integration","Request.Name":"redis-replicated"}
{"level":"info","ts":"2024-06-09T18:26:51Z","logger":"controllers.RedisReplication","msg":"Will reconcile redis operator in again 10 seconds","Request.Namespace":"integration","Request.Name":"redis-replicated"}
{"level":"info","ts":"2024-06-09T18:26:58Z","logger":"controllers.Redis","msg":"Reconciling opstree redis controller","Request.Namespace":"integration","Request.Name":"redis-standalone"}
{"level":"info","ts":"2024-06-09T18:26:58Z","logger":"controllers.Redis","msg":"Will reconcile redis operator in again 10 seconds","Request.Namespace":"integration","Request.Name":"redis-standalone"}
{"level":"info","ts":"2024-06-09T18:27:01Z","logger":"controllers.RedisReplication","msg":"Reconciling opstree redis replication controller","Request.Namespace":"integration","Request.Name":"redis-replicated"}
{"level":"info","ts":"2024-06-09T18:27:01Z","logger":"controllers.RedisReplication","msg":"Will reconcile redis operator in again 10 seconds","Request.Namespace":"integration","Request.Name":"redis-replicated"}
{"level":"info","ts":"2024-06-09T18:27:08Z","logger":"controllers.Redis","msg":"Reconciling opstree redis controller","Request.Namespace":"integration","Request.Name":"redis-standalone"}
{"level":"info","ts":"2024-06-09T18:27:08Z","logger":"controllers.Redis","msg":"Will reconcile redis operator in again 10 seconds","Request.Namespace":"integration","Request.Name":"redis-standalone"}
{"level":"info","ts":"2024-06-09T18:27:11Z","logger":"controllers.RedisReplication","msg":"Reconciling opstree redis replication controller","Request.Namespace":"integration","Request.Name":"redis-replicated"}

redis-operator version: 0.16.2

Does this issue reproduce with the latest release? Yes

What operating system and processor architecture are you using (kubectl version)?

kubectl version Output
$ kubectl version

```shell
kubectl version
Client Version: v1.29.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.8+k3s1
```

What did you do?

What did you expect to see? Chart should allow configuration for securityContext on additional containers as well: spec.sidecars, spec.redisExporter

What did you see instead? Only a few configurations (from podSecurityContext) are applied to redisExporter container.