-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[prometheus-redis-exporter] Allow REDIS_ADDR
environment variable to be configured through a secret
#3775
Merged
zanhsieh
merged 3 commits into
prometheus-community:main
from
apinity-io:support-redis-uri-from-secret
Sep 26, 2023
Merged
[prometheus-redis-exporter] Allow REDIS_ADDR
environment variable to be configured through a secret
#3775
zanhsieh
merged 3 commits into
prometheus-community:main
from
apinity-io:support-redis-uri-from-secret
Sep 26, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zanhsieh
previously approved these changes
Sep 14, 2023
@zanhsieh should I do anything else to be able to merge this change? 🙏 |
zeritti
reviewed
Sep 23, 2023
…ally to the configmap Signed-off-by: David Constenla <[email protected]>
And adjust variable names Co-authored-by: zeritti <[email protected]> Signed-off-by: David Constenla <[email protected]>
Signed-off-by: David Constenla <[email protected]>
Thank you so much for the comments @zanhsieh, good point. Accepted the suggestions and changed the outdated comments, I hope they are good 👌. Did again the validation of helm rendering with the combination of variables and everything seems fine. redisAddressConfig.enabled = false- name: REDIS_ADDR
value: redis://myredis:6379 redisAddressConfig.enabled = true- name: REDIS_ADDR
valueFrom:
configMapKeyRef:
name: testName
key: testKey redisAddressConfig.enabled = true && redisAddressConfig.isSecret = true- name: REDIS_ADDR
valueFrom:
secretKeyRef:
name: testName
key: testKey |
zanhsieh
approved these changes
Sep 26, 2023
Matiasmct
pushed a commit
to giffgaff/prometheus-charts-backup
that referenced
this pull request
Mar 20, 2024
…o be configured through a secret (prometheus-community#3775) * Allow `REDIS_ADDR` env var to be configured through a secret additionally to the configmap Signed-off-by: David Constenla <[email protected]> * Be explicit about the change breaking the values signature And adjust variable names Co-authored-by: zeritti <[email protected]> Signed-off-by: David Constenla <[email protected]> * Update the comment so it represents the current configuration Signed-off-by: David Constenla <[email protected]> --------- Signed-off-by: David Constenla <[email protected]> Signed-off-by: David Constenla <[email protected]> Co-authored-by: zeritti <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
This pr adds support for (prometheus-redis-exporter)[./charts/prometheus-redis-exporter/] redis address environment variable to be configured from a secret.
It would unlock for redis address to be fetched though eg: external-secrets.
Which issue this PR fixes
There is no issue linked to this change (that I know of).
Special notes for your reviewer
I've performed some sanity checks locally to verify the chart configuration stays as is and the new configuration also works.
Since changes are all around deployment's configuration I'm using
helm
+yq
to focus on that part of the rendered template.This is the specific used command:
using redisAddressConfig.enabled = false
No diff, it's literally
values.yaml
by default, renders as:using redisAddressConfig.enabled = true + redisAddressConfig.isASecret = false
Renders as:
using redisAddressConfig.enabled = true + redisAddressConfig.isASecret = true
renders as:
Checklist
[prometheus-couchdb-exporter]
)