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

Adds support for Redis username, sentinel username and password fields #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ Type: `redis`
Disable Property: `org.springframework.cloud.bindings.boot.redis.enable`

| Property | Value |
| ------------------------------------ | ------------------------- |
|--------------------------------------|---------------------------|
| `spring.redis.client-name` | `{client-name}` |
| `spring.redis.cluster.max-redirects` | `{cluster.max-redirects}` |
| `spring.redis.cluster.nodes` | `{cluster.nodes}` |
Expand All @@ -242,8 +242,11 @@ Disable Property: `org.springframework.cloud.bindings.boot.redis.enable`
| `spring.redis.port` | `{port}` |
| `spring.redis.sentinel.master` | `{sentinel.master}` |
| `spring.redis.sentinel.nodes` | `{sentinel.nodes}` |
| `spring.redis.sentinel.password` | `{sentinel.password}` |
| `spring.redis.sentinel.username` | `{sentinel.username}` |
| `spring.redis.ssl` | `{ssl}` |
| `spring.redis.url` | `{url}` |
| `spring.redis.username` | `{username}` |

### SAP Hana
Type: `hana`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ public void process(Environment environment, Bindings bindings, Map<String, Obje
map.from("port").to("spring.redis.port");
map.from("sentinel.master").to("spring.redis.sentinel.master");
map.from("sentinel.nodes").to("spring.redis.sentinel.nodes");
map.from("sentinel.password").to("spring.redis.sentinel.password");
map.from("sentinel.username").to("spring.redis.sentinel.username");
map.from("ssl").to("spring.redis.ssl");
map.from("url").to("spring.redis.url");
map.from("username").to("spring.redis.username");
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ final class RedisBindingsPropertiesProcessorTest {
.withEntry("port", "test-port")
.withEntry("sentinel.master", "test-sentinel-master")
.withEntry("sentinel.nodes", "test-sentinel-nodes")
.withEntry("sentinel.password", "test-sentinel-password")
.withEntry("sentinel.username", "test-sentinel-username")
.withEntry("ssl", "test-ssl")
.withEntry("url", "test-url")
.withEntry("username", "test-username")
)
);

Expand All @@ -68,8 +71,11 @@ void test() {
.containsEntry("spring.redis.port", "test-port")
.containsEntry("spring.redis.sentinel.master", "test-sentinel-master")
.containsEntry("spring.redis.sentinel.nodes", "test-sentinel-nodes")
.containsEntry("spring.redis.sentinel.password", "test-sentinel-password")
.containsEntry("spring.redis.sentinel.username", "test-sentinel-username")
.containsEntry("spring.redis.ssl", "test-ssl")
.containsEntry("spring.redis.url", "test-url");
.containsEntry("spring.redis.url", "test-url")
.containsEntry("spring.redis.username", "test-username");
}

@Test
Expand Down