Skip to content

Make the grafana operator able to create grafana service accounts and tokens from yaml #1388

Closed
@MickeHedlund

Description

@MickeHedlund

Is your feature request related to a problem? Please describe.
In cases where the grafana instances and grafana operator was removed from the cluster and had to be set up again, we had to manually create all the service accounts and tokens again and update the token everywhere it was being used. This is because today the service accounts can only be created in the grafana gui or by calling the http api endpoint. But that generates a new token automatically and has to be done as a manual step after deployment.

Describe the solution you'd like
I would like to be able to include a yaml file with Kind: GrafanaServiceAccount or similar, where I could specify the name of the service account, scope, name of token and set the token to what I want it to be, if not set it could create a token automatically when token name is set. The operator reads the objects and creates the service accounts in relevant grafana. Could use selectorLabels just like dashboards to get to the correct grafana instance etc.

Describe alternatives you've considered
I have concidered writing tools that uses the http api to create them all automatically for us, but that still results in a new auto generated token that has to be replaced everywhere its used. And has to be done as an extra step after deployment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions