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

Use redis-cli ping command instead of tcp socket to attest readiness of the redis-stack:7.2.0-v11 #732

Closed
damienvergnaud opened this issue Aug 28, 2024 · 2 comments

Comments

@damienvergnaud
Copy link

damienvergnaud commented Aug 28, 2024

Concerned lines :
https://github.com/falcosecurity/charts/blob/46516b090cc91d4c89630b91c393cf15e37ddac5/charts/falcosidekick/templates/deployment-ui.yaml#L211C1-L218C32

Based on :
https://stackoverflow.com/questions/64068179/readiness-probe-for-redis-with-large-dataset

Because if i observe logs of one starting pod :

│ 9:C 28 Aug 2024 13:58:53.127 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo                                                                                                                                    │
... REMOVED LINES ...   
│ 9:M 28 Aug 2024 13:59:56.320 * Ready to accept connections tcp                                                                                                                                                  │

In some cases, the others falco pods may think the service is ready to receive calls, which is not the case.

Correction that supposedly work (I verified the presence of redis-cli ping command inside the container).
It only respond "PONG" when redis is really READY to receive calls.

 readinessProbe:
  exec:
    command:
    - redis-cli
    - ping
  initialDelaySeconds: 20
  timeoutSeconds: 5
  periodSeconds: 3

Hope it helps ;)

This proposal has been made during my working time at WeScale company ;)

@Issif
Copy link
Member

Issif commented Sep 17, 2024

This is a good proposal, I'll test that solution

@Issif
Copy link
Member

Issif commented Sep 23, 2024

Done with #740

@Issif Issif closed this as completed Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants