[bitnami/redis] schema breaks templating
Name and Version
bitnami/redis 20.2.1
What architecture are you using?
amd64
What steps will reproduce the bug?
In any environment, set a master.podAnnotations to a template value and see this error.
Are you using any custom parameters or values?
redis:
master:
podAnnotations: '{{- include "mysite.com/common/annotations" . }}'
What is the expected behavior?
deploys normally and templates the annotations as it used to do.
What do you see instead?
error from schema that says "string" is not valid and only accepts objects.
Additional information
This has been the way we have done it forever. In order to fix this I would have to pass keys and only render the values. We return a large set of key/value pairs and this breaks our functionality.
simply updating https://github.com/bitnami/charts/blob/main/bitnami/redis/values.schema.json#L590C18-L590C32 and https://github.com/bitnami/charts/blob/main/bitnami/redis/values.schema.json#L1309 (I think are the two places) to allow 'string' or 'object' should be enough.
I also assume many other places will have this issue like 'podLabels', 'affinity', 'nodeSelectors'... a whole bunch. Essentially, any item in values.yaml that is templatable, but the schema limits to objects or boolean or array or anything not a string.
Is there a way to make helm check the schema AFTER render? I would expect it to work that way which would resolve this issue...
Luckily for now I found a work around. It appears that metrics.podAnnoations applies annotations to the same application.yaml https://github.com/bitnami/charts/blob/858b84ec9bc20f2775e01dbfe05d2eb190579f21/bitnami/redis/templates/master/application.yaml#L57 but is not blocked by schema. I just have to also enable metrics for it to apply.
Hi!
Thank you so much for reporting. I believe there were other PRs in the past changing the schema to allow both types of values. Would you like to submit a PR updating the schema?
What happened to those other PRs?
I can submit for the items that effect me now, but I don't have the time to go through all the other possible values that can be templates at this time.
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Bump to self
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.