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

Merge Gitjob Controller into Fleet Controller / Chart #2008

Closed
11 of 12 tasks
manno opened this issue Dec 11, 2023 · 2 comments
Closed
11 of 12 tasks

Merge Gitjob Controller into Fleet Controller / Chart #2008

manno opened this issue Dec 11, 2023 · 2 comments
Assignees
Milestone

Comments

@manno
Copy link
Member

manno commented Dec 11, 2023

rancher/gitjob is only used by Fleet, and adds to its maintenance/release overhead, both for Go code and for charts.
Instead, we could integrate rancher/gitjob contents into rancher/fleet and manage all Fleet-related logic from there.

Note:
Merging gitjob into the same code base adds some interesting possibilities in the future. We might be able to remove the gitjob CRD, the gitjob container image, so we have less complexity and a smaller download size.
This will become clearer when be build OCI repo support, but gitjob/gitrepo are as much their own component as oci repo is. So the split between gitjob vs gitrepo doesn’t make sense. Eventually, we might have “bundle” producing components (gitrepo, ocirepo) and a component which distributes bundles to clusters (fleetcontroller/targetting).
So, in short, we’re moving gitjob now, so maintenance and releases get easier, but it will also enable a clearer design in the future.

This would require us to:

  • move tests
  • remove the gitjob helm chart, placing it in the fleet chart (no more sub chart)
  • move the gitjob controller into fleet, keep it in a separate pod (it polls an external resource)
  • adapt drone workflow to publish image
  • remove "subchart config" from rancher/charts a
  • optional, move into same directory struct as fleet (internal/cmd/gitjob)
  • can we get rid of the GitJob resource in the future and use GitRepo instead?
  • keep the webhook in the same pod as gitjob

More housekeeping (in no particular order)

  • remove updatecli job
  • check .gitignore
  • update references to rancher/gitjob in docs throughout rancher/fleet
  • remove script .github/scripts/check-for-gitjob-changes.sh
@manno manno added this to Fleet Dec 11, 2023
@manno manno converted this from a draft issue Dec 11, 2023
@manno manno added this to the v2.9.0 milestone Dec 11, 2023
@manno manno changed the title Move Gitjob Controller into Fleet Repo Merge Gitjob Controller into Fleet Controller / Chart Dec 20, 2023
@weyfonk weyfonk self-assigned this Jan 17, 2024
@weyfonk weyfonk moved this from 📋 Backlog to 🏗 In progress in Fleet Jan 17, 2024
@weyfonk
Copy link
Contributor

weyfonk commented Jan 26, 2024

Once #2098 is merged:

@weyfonk
Copy link
Contributor

weyfonk commented Jan 26, 2024

When next releasing Fleet from a branch including #2098:

  • Remove packages/fleet/gitjob from rancher/charts' target branch (eg. by editing the PR generated by release-against-charts)
  • Check if newly generated index.yaml entry in rancher/charts still includes gitjob as a chart; it should not.
  • Check that packages/fleet/fleet/generated-changes no longer contains references to gitjob
  • Check that the auto-generated release PR against rancher/charts does not add any docker.io/rancher/gitjob tag entry to regsync.yaml, but generates an entry for docker.io/rancher/fleet-gitjob instead.
  • Test installing that Fleet release in Rancher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants