-
Notifications
You must be signed in to change notification settings - Fork 733
Add password for Valkey #7887
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
Add password for Valkey #7887
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR adds support for specifying a password when configuring a Valkey resource and updates the related connection string generation and persistence annotation. Key changes include:
- Introducing new overloads for AddValkey to allow optional password parameters.
- Modifying the connection string assembly in ValkeyResource to include the password.
- Updating tests and documentation to validate and demonstrate the new behavior.
Reviewed Changes
| File | Description |
|---|---|
| src/Aspire.Hosting.Valkey/ValkeyBuilderExtensions.cs | Added overloads and extended configuration parameters, including password handling and enhanced documentation. |
| src/Aspire.Hosting.Valkey/ValkeyResource.cs | Updated connection string logic to incorporate the password parameter and added a new constructor. |
| tests/Aspire.Hosting.Valkey.Tests/AddValkeyTests.cs | Expanded tests to verify connection string formatting and persistence annotations with and without a password. |
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/Aspire.Hosting.Valkey/ValkeyResource.cs:59
- Ensure that PasswordParameter's string representation matches the expected placeholder format (e.g. '{myValkey-password.value}' or '{pass.value}'). If not, consider explicitly using the appropriate property from PasswordParameter.
builder.Append($",password={PasswordParameter}");
|
@eerhardt can I get your input on this? It seems reasonable to me. It looks like the bitnami packages do something similar to support setting passwords on their versions of the Valkey container image. |
eerhardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks again @Alirexaa!
Description
The implementation is like #7599.
Contributes to #6155
Checklist
<remarks />and<code />elements on your triple slash comments?breaking-changetemplate):doc-ideatemplate):