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

Usage of Redis sentinel #18

Open
wkloucek opened this issue Oct 15, 2024 · 6 comments
Open

Usage of Redis sentinel #18

wkloucek opened this issue Oct 15, 2024 · 6 comments

Comments

@wkloucek
Copy link

In the following I'm referring the state of release/1.2.0 branch with OO 8.2.0-rc25

I would like to use Redis Sentinel instead of plain Redis.

Therefore I would set following settings:

connections:
  redisConnectorName: ioredis
  redisHost: rfs-redis

I had a look at the used lua library:

https://github.com/ledgetech/lua-resty-redis-connector?tab=readme-ov-file#connections-via-redis-sentinel

And I had a look at the code:

local ok, err = red:connect({{ .Values.connections.redisHost | quote }}, {{ .Values.connections.redisPort }})

Seems like the lua code is not ready for Sentinel out of the box?

@alexanderonlyoffice Did I oversee something?

@alexonlyoffice
Copy link

@wkloucek, you are right. Redis Sentinel is not supported and we do not have time to include its support in the upcoming release. We will implement it in the next version.

@wkloucek
Copy link
Author

wkloucek commented Jan 8, 2025

We will implement it in the next version.

What's the next version and it's rough ETA?

@alexonlyoffice
Copy link

@wkloucek, we are discussing the ETA. I will keep you updated.

@alexonlyoffice
Copy link

alexonlyoffice commented Jan 13, 2025

@wkloucek, we have prepared the test images of the version 8.2.2 where we added support for Redis Sentinel. You can take Helm from branch https://github.com/ONLYOFFICE/Kubernetes-Docs-Shards/tree/release/v2.1.0, the required images are uploaded to Docker Hub and have 8.2.2-4testing-sh1 tag.

documentserver.initContainers.image.tag: 8.2.2-4testing-sh1
documentserver.docservice.image.tag: 8.2.2-4testing-sh1
documentserver.proxy.image.tag: 8.2.2-4testing-sh1
documentserver.converter.image.tag: 8.2.2-4testing-sh1
customBalancer.image.tag: 8.2.2-4testing-sh1

You will also need to add the following parameters for Redis Sentinel connection to the values.yaml, please find the example below:

connections:
  redisConnectorName: ioredis
  redisHost: redis.default.svc.cluster.local
  redisPort: "26379"
  redisUser: default
  redisDBNum: "0"
  redisExistingSecret: redis
  redisSecretKeyName: redis-password
  redisNoPass: false
  redisSentinelGroupName: mymaster
  redisSentinelExistingSecret: redis
  redisSentinelSecretKeyName: redis-password
  redisSentinelUser: default
  redisSentinelPassword: ""
  redisSentinelNoPass: false

@wkloucek
Copy link
Author

@alexonlyoffice

I get this error execution error at (docs-shards/templates/secrets/redis-sentinel-password.yaml:16:59): A Redis Sentinel Password is required!

  redisSentinelPassword: ""
  redisSentinelNoPass: false

Seems not to be allowed

@alexonlyoffice
Copy link

@wkloucek, if you are connecting with no password for Sentinel, you should try setting connections.redisSentinelNoPass=true.

BTW please take Proxy image with tag 8.2.2-4testing-sh7 as there were some fixes added. Other images can be taken with tag 8.2.2-4testing-sh1.

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

No branches or pull requests

2 participants