-
Notifications
You must be signed in to change notification settings - Fork 21
fix: delete redis from bitnami and provide own templates #1267
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
base: develop
Are you sure you want to change the base?
Conversation
charts/splunk-connect-for-snmp/templates/redis/redis-standalone-statefulset.yaml
Show resolved
Hide resolved
charts/splunk-connect-for-snmp/templates/redis/redis-standalone-statefulset.yaml
Show resolved
Hide resolved
| {{- if .Values.redis.auth.enabled }} | ||
| env: | ||
| - name: REDIS_PASSWORD | ||
| {{- if or .Values.redis.auth.existingSecret }} |
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.
"or" with single value
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.
fixed
charts/splunk-connect-for-snmp/templates/redis/redis-standalone-statefulset.yaml
Show resolved
Hide resolved
| args: | ||
| - | | ||
| # Copy config to writable location | ||
| cp /etc/redis/redis.conf /tmp/redis.conf |
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.
Do we need to do this? We shouldn't have to save the password as it is already done in the config map.
And if someone will change the config map, the /etc/redis/redis.conf file will be updated but not the /tmp/redis.conf so for changes to apply the redis container has to be restarted.
So maybe we should stick to the original file, or add to the documentation that the redis has to be restared each time someone changes the config map?
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.
I think in every case when we use secrets this is the scenario that you have to recreate pods in order for them to mount a new secret (same with configmap). I think it is a good idea to add it to the documentation.
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.
The restart requirement can be avoided if in the statefulset's pod tempate we add an annotation that includes a checksum of the configmap's values with something like below:
checksum/config: {{ include (print $.Template.BasePath "templates/redis/redis-config.yaml") . | sha256sum }}
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.
hello @mattk42, thanks for the comment! 😄 I updated the template and tested — it works fine.
But in this case it'd be more beneficial to have such annotation for secrets. The only thing is that then we'd need to include such annotation on almost every pod (as all of them connect to the redis and have redis secret being mounted to it in order to calculate the connection string). Does it make sense? Is this how it should be done? The alternative way is to document that user has to recreate pods after changing secret's value.
Also, it would be difficult to calculate it as we can either have secret created from the /redis-redis-secret.yaml or the secret passed by the redis.auth.existingSecret
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.
Yeah, that would be challenging and would add to the complexity of the chart as a whole. Personally I do really like automating the restarts, but it may not be worth the complexity in this case especially if it does not happen often.
287f87f to
9a73360
Compare
Description
This PR:
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
TBD
Checklist