You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following manifests result in a data source being added to the grafana instance with the correct username for basic authentication, but the password field for basic authentication is empty and the datasource doesn't work.
I just discovered this as well and have figured out the cause.
Recently the grafana-operator moved to use the grafana-openapi-client and unfortunately it has secureJsonFields instead of secureJsonData. See this line. So, when the datasource controller attempts to unmarshal here it sets secureJsonFields to nil as it doesn't know about secureJsonData.
I'd assume that in order to not break backward compatibility, getDatasourceContent would probably need to do this mapping.
Actually, looking more at this, SecureJSONFields is a map of bool, so actually, kinda looks like issue is that models.DataSource is the wrong thing to use as it's assuming that secure data is not available (hence bool instead of a value).
Seems like either models.AddDataSourceCommand or models.UpdateDataSourceCommand would need to be used instead (the difference being that UpdateDataSourceCommand has a Version).
Describe the bug
The following manifests result in a data source being added to the grafana instance with the correct username for basic authentication, but the password field for basic authentication is empty and the datasource doesn't work.
loki-datasource.yaml
grafana.yaml
Version
grafana-operator v5.8.1
To Reproduce
Deploy the provided manifests
Expected behavior
Loki datasource being setup properly with the basic authentication password
Suspect component/Location where the bug might be occurring
unknown
Screenshots
Runtime (please complete the following information):
The text was updated successfully, but these errors were encountered: