chartmuseum / storage

Go library providing common interface for working across multiple cloud storage backends
Apache License 2.0
215 stars 62 forks source link

GitOps Storage: add support for specifying a Git provider for storage backend #436

Open Dentrax opened 2 years ago

Dentrax commented 2 years ago

TL;DR: We are proposing to add a new storage backend for GitHub/GitLab to store/mirror the charts.


GitOps is having a Git repository that always contains declarative descriptions of the infrastructure currently desired in the production environment and an automated process to make the production environment match the described state in the repository. ^1

Let's assume we have a self-managed GitLab server. And we prefer not to use for the external storage in the cloud services.

Here is the idea for the GitLab:

  1. GitLab Hostname: gitlab.internal.com, base group /helm-charts
  2. We want to store https://falcosecurity.github.io/charts chart in the repo called falcosecurity/charts
  3. Create a root group called /helm-charts, if not exist
  4. Create a subgroup called falcosecurity, if not exist
  5. Create a repo called charts, if not exist
  6. Force push the all files (or commits) to store

We can create custom gitlab.go and github.go providers for this if it makes sense!

cc @jdolitsky

jdolitsky commented 2 years ago

@Dentrax I think it's a fantastic idea.

Would be great if it was "generic" git provider, but maybe necessary to have separate GitHub/GitLab providers

rjeczalik commented 2 years ago

I hacked a quick backend for github.com, some examples here if anyone is interested in trying out: https://hub.docker.com/repository/docker/rjeczalik/chartmuseum-github

If this is a good direction, I could cleanup the code, add some missing parts and try to merge it with the upstream.

jdolitsky commented 2 years ago

@rjeczalik would be great to see a PR for github backend 👍