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

[bitnami/redis] Removes master/slave when using sentinel #3658

Merged
merged 8 commits into from
Sep 17, 2020

Conversation

rafariossaa
Copy link
Contributor

Description of the change

This deploy a new statefulset used only when enabling sentinel. This will allow the clients to connect when a slave is promoted.

Benefits
Master/slave statefulsets division is not usable when using sentinels because you can't ensure that the master node is the one in the master statefulset.

Possible drawbacks

Applicable issues

Additional information

Checklist

  • Chart version bumped in Chart.yaml according to semver.
  • Variables are documented in the README.md
  • Title of the PR starts with chart name (e.g. [bitnami/chart])
  • If the chart contains a values-production.yaml apart from values.yaml, ensure that you implement the changes in both files

⚠️ Keep in mind that if you want to make changes to the kubeapps chart, please implement them in the kubeapps repository. This is only a synchronized mirror.

Copy link
Contributor

@andresbono andresbono left a comment

Choose a reason for hiding this comment

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

LGTM

runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
command:
- /bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

This script is long, maybe it is more maintainable if we move it to a configmap

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I a future review of redis I would like to move the logic to the container scripts where I think it suits best.
What do you think ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In order to keep it cleaner, I moved the command shell scripts of all the statefulsets to a new configMap

@gnomus
Copy link

gnomus commented Sep 16, 2020

This could potentially solve our problem we are having with redis all the time.
Would be awesome to get it merged soon 😄

@rafariossaa
Copy link
Contributor Author

I have added some instructions on how to make a backup and restore.

@javsalgar javsalgar merged commit 782f4bf into bitnami:master Sep 17, 2020
@Klohto
Copy link

Klohto commented Sep 17, 2020

FYI, if you were doing a "single-instance" Redis (cluster.enabled = false, sentinel.enabled = false) this update will break it.

I suppose our approach wasn't supported and I have already moved to cluster.enabled = true and slaveCount = 0 but this is mostly to anybody who did the same as us 🤷‍♂️

@fengsi
Copy link
Contributor

fengsi commented Sep 18, 2020

@Klohto same here. I was able to use a single master in dev env but now this PR broke that. I don't think it's fully tested. :(

@marcosbc
Copy link
Contributor

Thanks for reporting. If a single-instance Redis used to work before, it should still be supported. Let's continue the discussion on #3707.

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

Successfully merging this pull request may close these issues.

Sentinels are not working in failover case
7 participants