jlewi / hydros

hydros automates hydrating and committing configuration
Apache License 2.0
4 stars 0 forks source link

Load ManifestSync's from GitHub - follow GitHub App Pattern #5

Open jlewi opened 1 year ago

jlewi commented 1 year ago

Right now the ManifestSync objects to be processed are provided as configuration files passed to hydros on startup.

This means a repository owner needs to make a change in the directory that configures hydros in order to setup hydros.

I think a better pattern would be to follow the GitHub App pattern and load the configurations from the repositories hydros is installed on.

One question that would come up would be whether it should be the source or destination repo that the ManiestSync should live in?

I think it should be the destination repository because that destination repository is what gets modified by hydros. So when authoring a change to a ManifestSync you should need to prove you have ownership of the destination repository.

jlewi commented 5 months ago

See: https://github.com/jlewi/hydros/blob/main/docs/design_declarative_cd.md#github-app

I don't think we want to go with GithubApp pattern. As proposed in that doc the idea is to go with a controller pattern and rely on gitops tools to continuously apply the manifests.

At most we should have a webhook which allows reconcile events to be triggered in response to a github event.