Skip to content

Conversation

@elimelt
Copy link

@elimelt elimelt commented Dec 5, 2025

Description

Describe your pull request here

Adds support for nodeAddressMap to sentinel client options, equivalent to cluster's nodeAddressMap feature.

I'd like to be able to use/test Sentinel from outside a k8s cluster, but returned addresses aren't resolvable to the client

Closes #3144


Checklist

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

@jit-ci
Copy link

jit-ci bot commented Dec 5, 2025

Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset.

In case there are security findings, they will be communicated to you as a comment inside the PR.

Hope you’ll enjoy using Jit.

Questions? Comments? Want to learn more? Get in touch with us.

@elimelt elimelt marked this pull request as ready for review December 8, 2025 21:09
@PavelPashov
Copy link
Contributor

Thank you for the PR. I’ve added it to my review list.

@elimelt
Copy link
Author

elimelt commented Dec 29, 2025

@PavelPashov any way we could try and re-run the tests for 8.0.2 to see if this is a flake?

Copy link
Collaborator

@nkaradzhov nkaradzhov left a comment

Choose a reason for hiding this comment

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

@elimelt thanks for this, it looks good in general. I just left couple of nits

Address PR review comments:
- Remove duplicate #getNodeAddress methods from RedisSentinelInternal and RedisSentinelFactory
- Add getMappedNode utility function in utils.ts that takes host, port, and nodeAddressMap
- Update all callsites to use the new utility function

This eliminates code duplication and makes the address mapping logic reusable.
@elimelt
Copy link
Author

elimelt commented Jan 7, 2026

@nkaradzhov fixed!

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.

Redis Sentinel ip address/hostname mapping config

3 participants