Automated pull requests with Flux requires the Image Update Automation controller and setting up push options for your Git host. It is not super well documented by the Flux team. There is a single example show how to use a similar feature, "Merge Requests", in GitLab. As I am using Gitea and will be unable to use this example in my home lab, I will work on the issue in the GitHub repository for Gitea.
I expect to be able to push using the options and have Gitea automatically open a pull request.
Files I expect I will need to work with and around:
- gitea/routers/private/hook_post_receive.go at main · go-gitea/gitea (github.com)
- gitea/cmd/hook.go at main · go-gitea/gitea (github.com)
I would like to use this feature to separate my environments using branches instead of multiple folders. Each branch can be protected from unwanted changes and, it will be possible to review the potential changes the new image may require.
UPDATE: December 13, 2023
Looks like Gitea already has support for this under the help heading "Agit Setup". I have already tested the feature as working using git options locally and will continue with moving my Kubernetes resources into a repository with image automations set up.