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

[CHORE] adding datasources provisioning #8

Merged

Conversation

nicolastakashi
Copy link
Contributor

@nicolastakashi nicolastakashi commented Sep 1, 2023

Description

I'm adding the ability to provision datasources when install Perses using helm chart.

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, IGNORE.
  • All commits have DCO signoffs.

Signed-off-by: Nicolas Takashi <nicolas.tcs@hotmail.com>
@nicolastakashi nicolastakashi force-pushed the chore/adding-globaldatasource-volume branch from 92ec8fc to a1be1b2 Compare September 1, 2023 11:20
@Nexucis
Copy link
Member

Nexucis commented Sep 1, 2023

I don't get how Perses will consider the globalDatasource provisioned, since it should go in a specific folder in the database folder

@nicolastakashi
Copy link
Contributor Author

nicolastakashi commented Sep 1, 2023

I don't get how Perses will consider the globalDatasource provisioned, since it should go in a specific folder in the database folder

Actually i'm mounting the configmap under the {{ .Values.config.database.file.folder }}/globaldatasources does it make sense?

I just tested it locally and it worked as expected.
We can add a test for that if you think wdyt?

@Nexucis
Copy link
Member

Nexucis commented Sep 1, 2023

well the issue is that you are also mounting a volume there where the BE can write. Is it still possible to create another globalDatasource ?

@nicolastakashi
Copy link
Contributor Author

well the issue is that you are also mounting a volume there where the BE can write. Is it still possible to create another globalDatasource ?

Oh now I got it!
If I'm not wrong we just need to ensure securityContext.fsGroup is the same group as the container user and it should work out of the box.

Is there anyway to test it today, since we don't have GlobalDataSource CRUD? @Nexucis

@Nexucis
Copy link
Member

Nexucis commented Sep 1, 2023

Is there anyway to test it today, since we don't have GlobalDataSource CRUD? @Nexucis

Weeelll you have it through the CLI. It's not super easy but it should work :). percli apply -f globaldatasource.json

@nicolastakashi
Copy link
Contributor Author

Is there anyway to test it today, since we don't have GlobalDataSource CRUD? @Nexucis

Weeelll you have it through the CLI. It's not super easy but it should work :). percli apply -f globaldatasource.json

You're so right 🥲
Maybe the workaround would be use a initcontainer.

But I'll let another question.
If I can manage datasources through helm why I'd like to add it through cli/ui?

@Nexucis
Copy link
Member

Nexucis commented Sep 26, 2023

If I can manage datasources through helm why I'd like to add it through cli/ui?

I think a good way to do it would be through CRDs then.
From my perspective, if you want to have a datasource provisioning, it supposed you still have perses connected to a database which means it can create datasource with the API ( so with a different flow)

@nicolastakashi
Copy link
Contributor Author

nicolastakashi commented Oct 2, 2023

If I can manage datasources through helm why I'd like to add it through cli/ui?

I think a good way to do it would be through CRDs then. From my perspective, if you want to have a datasource provisioning, it supposed you still have perses connected to a database which means it can create datasource with the API ( so with a different flow)

I see your point and I can agree on a certain level, but I see the CRD being part of the Perses operator (under development yet), and the operator will be another option to deploy and manage Perses.

With that in mind, I see this helm chart as an option to deploy and manage Perses without having to manage an operator and all its resources such as CRDs.

After a while of thinking about this, my idea to overcome the read-only file system issue you pointed out is to leverage the Perses CLI as a side-car and leverage the apply command to apply the dashboards without mounting them. volume.

WDT? @Nexucis

@Nexucis
Copy link
Member

Nexucis commented Oct 3, 2023

With that in mind, I see this helm chart as an option to deploy and manage Perses without having to manage an operator and all its resources such as CRDs.

yeah me too. perses-operator shouldn't be mandatory to use perses.

After a while of thinking about this, my idea to overcome the read-only file system issue you pointed out is to leverage the Perses CLI as a side-car and leverage the apply command to apply the dashboards without mounting them. volume.

That could work indeed !

@nicolastakashi nicolastakashi force-pushed the chore/adding-globaldatasource-volume branch 4 times, most recently from 668c6d2 to 587cd89 Compare October 10, 2023 22:03
@nicolastakashi nicolastakashi force-pushed the chore/adding-globaldatasource-volume branch from 587cd89 to e5b9c7e Compare October 13, 2023 09:39
@nicolastakashi nicolastakashi changed the title [CHORE] adding global datasources provisioning [CHORE] adding datasources provisioning Oct 13, 2023
@nicolastakashi nicolastakashi force-pushed the chore/adding-globaldatasource-volume branch from e5b9c7e to 5ac46a0 Compare October 13, 2023 10:31
Copy link
Member

@Nexucis Nexucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳

@nicolastakashi nicolastakashi merged commit 80f20c9 into perses:main Oct 13, 2023
2 checks passed
@nicolastakashi nicolastakashi deleted the chore/adding-globaldatasource-volume branch October 13, 2023 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants