-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Make Prow support multiple build clusters. #5848
Comments
/area prow |
Which specific jobs do you have in mind that need such credentials? |
The main use case is for jobs that we want to implement as trusted periodic jobs, but which currently have to implemented as k8s CronJobs. The label_sync tool is an example. The Another use case would be adapting the |
There's also been some consideration of automatically publishing images for eg test-infra as a post-submit. |
@munnerz also wanted to do something similar. It's possible to do it today with |
/cc @perotinus who could probably take advantage of this to improve security around nightly image push. |
While there are valid cases for a separate trusted build cluster, I want to make clear that certain types of programs should not be run as prowjobs. As a general rule, anything that acts as The The label_sync tool, That all said, the consideration of automatically publishing artifacts to a trusted location as a postsubmit or a nightly thing does make sense. That is a valid use for a trusted cluster.
Agreed that it's better to not use plank label selectors for this. |
@spxtr Why do you consider automatically publishing artifacts to a trusted location a valid use of a trusted cluster, but not things like the inactive_review_handler or needs-rebase munger? They are both periodic jobs that needs privileged credentials. I think the downside to using k8s cronjobs instead of periodic jobs is the extra management effort to redeploy them whenever they are updated. If we implemented the proposed additions to the |
Prow components should all live in the same place and look the same. They should have the same deployment, logging, and monitoring. Automatically publishing artifacts isn't a prow component. It's a general CI/CD step that most people using Jenkins or buildbot or whatever will end up setting up. It makes total sense to have the nightly build, test, and deploy jobs be prow jobs.
This is a general downside to all of prow development. This problem is being worked on by mattmoor, fejta et al, and these cronjobs will piggyback on that work. |
This sounds right to me, but I do want to mention that I don't think we should stress "sticking to kubernetes" too strongly... we often need to work around things in Kubernetes that aren't solved yet. We can provide Kubernetes (and hopefully others!) with good infrastructure without 100% dog-fooding. Also, to be fair:
That said:
This 1000x. We should reach a point where we regularly deploy a If we get to this point it won't really matter if we're pushing a prow config change or applying an updated k8s cron yaml. Side note: Another fairly valid use-case is that the security repo needs restricted access credentials, and it would be nice to not need to maintain two Prow deployments for this. We could combine this with #5806? Edit: I also 👍'd your comment directly above @spxtr, I just think these things are more generally worth mentioning as broader points, not too terribly specific to this issue. |
Honestly I'd like to move whatever we can out of plugins and into prow jobs. I do not see a good reason for things like the lint plugin to be a plugin versus a job. The latter makes more sense and keeps the core part of prow smaller. |
Also has anyone started a design doc for how I will tell which cluster to schedule a job in, as well as how to inform prow which clusters are possible? |
I'll make a doc, thats the next thing I want to get done so that we can get the security repo fixed. |
If we want to go all the way in that direction then we can get rid of the plugin architecture entirely and have the only "plugin" be that which triggers prowjobs. This is a reasonable idea, but I'm not sure it's worth it now that we have external plugins. We can already pull the lint plugin out of the hook binary and into its own deployment. Then we can add pylint and friends to the lint image without mixing it up with the hook image. |
I do like the idea of not putting linters in the image, but surely this only makes sense for a certain class of plugins, lots of them are very small evented things? |
This was implemented in #6053 |
If we refactor Prow to support multiple build clusters we can run specific jobs in a trusted cluster where they can be given credentials that are too privileged to host on the current build cluster.
This could potentially be achieved by using multiple
plank
controllers that partition the jobs they handle with label selectors. One controller could be used for each separate build cluster.I think it is probably cleaner to just allow jobs to specify a build cluster alias in their config if they require a cluster besides the default and change the build-cluster config to be a map from cluster aliases to cluster credentials.
The text was updated successfully, but these errors were encountered: