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

Automatic datasource activation upon creation fails, requiring manual "Save & Test" for plugin connection #30245

Open
jcapote22 opened this issue Nov 6, 2024 · 1 comment
Assignees
Labels
grafana-operator tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@jcapote22
Copy link

jcapote22 commented Nov 6, 2024

Name and Version

bitnami/grafana-operator-4.7.4

What architecture are you using?

None

What steps will reproduce the bug?

1- Deploy Grafana with Grafana Operator version 5.14.0-debian-12-r0.
2- Create a datasource resource in Kubernetes.
3- Observe the initial error "Query error: An error occurred within the plugin" when accessing the datasource in the Grafana UI.
4- Manually click "Save & Test" in the UI to establish the connection.

Are you using any custom parameters or values?

apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDatasource
metadata:
  name: elasticsearch-peru
  namespace: grafana-operator-system
spec:
  valuesFrom:
    - targetPath: "basicAuthUser"
      valueFrom:
        secretKeyRef:
          name: "extra-credentials"
          key: "user"
    - targetPath: "secureJsonData.basicAuthPassword"
      valueFrom:
        secretKeyRef:
          name: "extra-credentials"
          key: "pass"
  instanceSelector:
    matchLabels:
      grafana: default
  datasource:
    access: proxy
    jsonData:
      timeInterval: 5s
      tlsSkipVerify: false
      index: "banco-pe-omni*"
    secureJsonData:
      "basicAuthPassword": ${pass}
    name: ElasticBFPE
    type: elasticsearch
    url: https://internal url
    basicAuth: true
    basicAuthUser: ${user}

What is the expected behavior?

Ideally, the Grafana Operator should automatically connect and validate each datasource upon creation, removing the need for manual intervention. This would significantly improve workflow efficiency, especially when deploying multiple datasources.

What do you see instead?

Query error: An error occurred within the plugin

image

Additional information

When creating datasources in Grafana via Kubernetes resources, each datasource appears correctly in the Grafana UI. However, accessing the datasource shows the following error message:

"Query error: An error occurred within the plugin"
image

Despite this initial error, the datasource successfully connects after manually clicking the "Save & Test" button in the UI. This process is problematic, especially when creating multiple datasources, as it requires manually opening each one and pressing "Save & Test" to establish the connection.

image

image

@jcapote22 jcapote22 added the tech-issues The user has a technical issue about an application label Nov 6, 2024
@github-actions github-actions bot added the triage Triage is needed label Nov 6, 2024
@carrodher
Copy link
Member

Hi, the issue may not be directly related to the Bitnami container image/Helm chart, but rather to how the application is being utilized, configured in your specific environment, or tied to a particular scenario that is not easy to reproduce on our side.

If you think that's not the case and want to contribute a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

Suppose you have any questions about the application, customizing its content, or technology and infrastructure usage. In that case, we highly recommend that you refer to the forums and user guides provided by the project responsible for the application or technology.

With that said, we'll keep this ticket open until the stale bot automatically closes it, in case someone from the community contributes valuable insights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grafana-operator tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants