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

toYaml in rancher-monitoring/grafana chart when setting extraVars causes problems when not using strings #27720

Closed
Arno500 opened this issue Jun 24, 2020 · 4 comments

Comments

@Arno500
Copy link

Arno500 commented Jun 24, 2020

What kind of request is this (question/bug/enhancement/feature request):
Bug

Steps to reproduce (least amount of steps as possible):
Set extraEnv in Grafana chart (using the monitoring menu, cluster-wide).
For the example, we'll use :

  • grafana.extraVars[0].name = GF_SMTP_ENABLED
  • grafana.extraVars[0].value = true

We need this env variable to enable SMTP alerts in included Grafana. But here, we only want the true in the value field to be quoted and set (should be "true"). But with toYaml, it will keep it true, as a boolean, thus being refused by Kubernetes (only accepting strings in env).
If I try with "true" directly in the field, toYaml wants to keep the string intact, and output '"true'". But I can't get a simple "true" unfortunately.

Result:

Other details that may be helpful:
helm/helm#4262
The toYaml function causes some problems when converting types. But for env variables, values should not be converted, only quoted.
helm/helm#4262 (comment)

Environment information

  • Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): 2.4.5
  • Installation option (single install/HA): Single, with helm.
@rlio
Copy link

rlio commented Jan 27, 2021

Same problem for us Did you solve it @Arno500 ?

@Arno500
Copy link
Author

Arno500 commented Jan 29, 2021

Same problem for us Did you solve it @Arno500 ?

@rlio I think I saw another issue where they mentioned they will refactor entirely the monitoring charts in Rancher (notably by updating Grafana). So I kind of abandoned, waiting for this new version.

@rlio
Copy link

rlio commented Jan 29, 2021

Thanks @Arno500. I have removed all extraVars parameters to be able to upgrade to the latest version

@stale
Copy link

stale bot commented Jul 8, 2021

This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 60 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions.

@stale stale bot added the status/stale label Jul 8, 2021
@stale stale bot closed this as completed Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants