Skip to content

Add config for Redis hostname announcing

John Skarbek requested to merge jts/redis-6_2-hostnames into master

What does this MR do?

Adds settings related to announcing hostnames when Redis 6.2 is utilized.

Uses the resolv module and regex to determine if the supplied values for the announcement hosts are IP addresses, or just FQDNs. If the user supplied an FQDN, we'll instruct Sentinel to utilize these options to ensure that hostnames are properly resolved. If FQDN's are provided, and Sentinel is NOT configured with the options to resolve the hostname, then Sentinel will fail.

It is recommended that hostnames, if used, are used everywhere: https://redis.io/topics/sentinel#ip-addresses-and-dns-names

Because this is a relatively new option, and introduces some complexity, I'm opting to not provide any documentation updates such that we remove some of the burden this may place on supporting this configuration. We are, however, providing users a method of overriding this mechanism if the need arises for any reason.

Please note that our helm chart utilizes bitnami's redis helm chart, which does this behavior BY DEFAULT on later versions of the chart. Earlier versions of the helm chart still rely on IP addresses, but had been deemed difficult to manage. Reference the following PR, and related issues this fixes: https://github.com/bitnami/charts/pull/7461

Addresses: gitlab-com/gl-infra/scalability#1468 (closed)

Related issues

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks
  • trigger-package has a green pipeline running against latest commit

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • [-] Equivalent MR/issue for the GitLab Chart opened See above
Edited by Igor

Merge request reports