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

Helm Chart Enhancements: Cluster Mode Deployment, Adding, Resharding, and Deleting Clusters #534

Closed
wants to merge 14 commits into from

Conversation

njnicko
Copy link

@njnicko njnicko commented Jul 26, 2024

This PR introduces several enhancements to the Helm chart for deploying Redis clusters in cluster mode. The key features include:

  1. Cluster Mode Deployment

  2. Node Addition

  3. Node Removal

  4. Resharding

This PR aims to simplify the management of Redis clusters and enhance scalability and reliability.

@yrajas yrajas requested a review from msft-paddy14 July 26, 2024 19:11
@vazois vazois self-requested a review August 1, 2024 18:15
@badrishc
Copy link
Contributor

badrishc commented Aug 5, 2024

Can folks in the community review this PR (we do not use Helm much ourselves)? @babykart @AlexCaston

spec:
containers:
- name: cmd
image: redis:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider allowing to override this - similar to the init-job configuration ("{{ .Values.cluster.initJob.image.registry }}/{{ .Values.cluster.initJob.image.repository }}:{{ .Values.cluster.initJob.image.tag | default "latest" }}")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How was this addressed, I don't see a new commit. Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider splitting into two separate files (ie. cluster-sts.yaml & standalone-sts.yaml) so that it is more easily readable and maintainable.

spec:
containers:
- name: cmd
image: redis:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this say redis-latest? We have nothing to do with that image.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that pod is used for testing. So, i'll remove it from the pr.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also to use the redis-cli, don't we have to use the redis image?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't redis-tools sufficient for this?

command: ["/bin/sh", "-c"]
args:
- |
garnet_host="{{ include "garnet.fullname" . }}-0.{{ include "garnet.fullname" . }}-headless.{{ .Release.Namespace }}.svc.cluster.local"
Copy link
Contributor

@Xizt Xizt Aug 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when pod-0 is down or unknown state ?
With reshard-delete-job.yaml, if pod0 restarts how will it be able to re-shard

command: ["/bin/sh", "-c"]
args:
- |
garnet_host="{{ include "garnet.fullname" . }}-0.{{ include "garnet.fullname" . }}-headless.{{ .Release.Namespace }}.svc.cluster.local"
Copy link
Contributor

@Xizt Xizt Aug 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This contains quite some logic for resharding. Is there a way we can unit test this 🤔

args:
- |
garnet_host="{{ include "garnet.fullname" . }}-0.{{ include "garnet.fullname" . }}-headless.{{ .Release.Namespace }}.svc.cluster.local"
garnet_port="{{ .Values.containers.port }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

garnet host, garnet port being used across multiple files. Wondering if this can be centrally managed along with other configurations like retries, sleep intervals..

Copy link
Contributor

@babykart babykart Aug 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file must be removed because is duplicated with the standalone-sts.yaml.

affinity: {}

# Default values
statefulSet:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This key should be removed and the sub key annotations should be put in cluster.statefulSet & standalone.statefulSet .

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the comments (# -- ...) that wil be used by helm-docs to generate the README.md
Furthermore, I invite you to add this type of comment to provide a description per key, briefly describing its use for users.

@badrishc
Copy link
Contributor

@njnicko - could you address the comments and push commits when you get a chance, thanks again for your PR.

@badrishc
Copy link
Contributor

badrishc commented Dec 5, 2024

Closing as outdated. We have a proper Helm chart package now thanks to @babykart. Would be great to see a cluster version contributed over that version, at some point. Thank you!

@badrishc badrishc closed this Dec 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants