carvel-dev / kapp-controller

Continuous delivery and package management for Kubernetes.
https://carvel.dev/kapp-controller
Apache License 2.0
268 stars 104 forks source link

Add the ability to reference a GitRepository resource #1335

Open warroyo opened 1 year ago

warroyo commented 1 year ago

Right now there is some overlap when using Flux and Kapp controller together. Flux already provides the source controller to be able to poll a git repo. Kapp also has this functionality. It would be really nice to be able to use the Flux controller's GitRepository resource as a source for the Kapp controller. Today I can use the app.spec.fetch.http to reference the tar that the GitRepository creates, but that is not sustainable. being able to reference the GitRepository natively within the app spec would make this really easy to use and essentially turn Kapp into a flux controller .

I would propose that we add app.spec.fetch.GitRepository (or something similar) to the spec so that this can be done natively.


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible" 👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

vrabbi commented 1 year ago

I like the idea, but would recommend maybe a bit more generic then the gitrepository resource, we could make it require the gvk and then support any of the source controllers objects which all follow the same contract as the gitrepository one such as the s3 and oci sources as well. Maybe calling the field FluxSource and then we could support any of them.

warroyo commented 11 months ago

I did an experiment to get this working using flux + secretGen controller and it worked. it's a bit more complicated then I would hope so having this work natively would be great. https://github.com/warroyo/kapp-flux-example

github-actions[bot] commented 10 months ago

This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response.

100mik commented 9 months ago

This sounds like something that #1413 will resolve, allowing folks to build out pluggable bits

voor commented 8 months ago

This is something that might help resolve https://github.com/carvel-dev/vendir/issues/361 as well, as Flux's GitRepository can properly talk to basic auth servers (which the git cli struggles with)