Monitoring: unable to set extraVars for Grafana

I have enabled the monitoring through the UI and all the resources were successfully created and the monitoring is correctly working.

I want to send an alert by email but I need to configure the SMTP host. I tried to add the env variabile through the “cluster-monitoring” chart by setting the extraVars by adding the answers in the following way:


but I receive this error:

Failed to install app cluster-monitoring. Error: UPGRADE FAILED: failed to create patch: failed to get versionedObject: unable to convert unstructured object to apps/v1, Kind=Deployment: unrecognized type: string 

I think that the problem is the value “true” of the first object.
How can I make it accept the value “true”?

If I do not add the first object with the value “true”, I am able to add the variables (I see them in the environment variable section), but they disappear because of the pod initialization process which deletes the container before initializing it.
If I add manually the variables to the Grafana container, I am able to configure SMTP correctly, but I need a way to configure it via chart variables.
How can I persist that environment variables?

Rancher version: 2.2.4
Monitoring chart version: 0.0.3


I solved it by applying the answers in the Tools > Monitoring menu. In this way the options are applied even if the pods restart.

For the value true, the solution was to pass it in this way:


because it is a string in the yaml, not a boolean.