Closed adamgoossens closed 3 years ago
By the way, looks like the checks failed because they require repository secrets that aren't exposed to forks. We'll also need to add this image build to .github/workflows/publish.yaml
@adamgoossens @andykrohg shouldt the install of any plugins be part of the operator and not us trying to maintain a jenkins image when red hat already ships a (importanltys upported) jenkins image? the entire point of all of this is not to require a bunch of jenkins plugins the only two we install are:
I agree the list of plugins we require on top of the RH Jenkins image should be kept to a minimum, if not non-existent. However, installing plugins by way of plugins.txt is different than installing through the front end (and then restarting the server, if necessary). At first, we started with Gitea, but realized that installing that plugin by itself broke other things on the server (kubernetes plugin, blue ocean, or Multibranch Pipeline). So the list has grown because achieving functionality for all the things we need requires more stuff to be explicitly called out in plugins.txt.
We could bypass the requirement to maintain a separate image but in order for operator deployments to continue to be successful, we'd need to either
@andykrohg i would think the approach for the plugins for Jenkins should be like that of the operator hub and container images. step 0 is downloading any necissary plugins to disk and sneakernetting them in and putting them in an internal repo, and then configure jenkins to pull its updates/plugins from that internal repo rather then the internet.
@itewk I understand what you're saying. If we do follow the OperatorHub model this approach allows for that, to a a point: this becomes an exposed relatedImage of the CSV, it's pulled down automatically by catalog mirroring tools, and no extra work on the part of the user is required.
I suppose it depends on how much extra work we want users to do in order for the Operator to install and work successfully in disconnected environments, and how many assumptions we're willing to make about the users hosting their own internal repository for Jenkins plugins. I personally lean towards assuming nothing and minimising friction to getting started but I know there are trade-offs there.
I do agree though that best case would be not requiring any extra plugins.
Thinking further, another option might be to ship the images but also expose a parameter in the operator to allow configuring an update center URL. If the update center URL is configured we use that as the plugin source and configure Jenkins appropriately. If it doesn't, we use our bundled plugins.
I am going to differ to @kharyam and @dwinchell on this one.
@dwinchell @kharyam curious on your thoughts here as well, but to @itewk 's point about consistency with sneakernetting patterns, any way we approach this will require us to maintain a collection of plugins that we need to port into a disconnected environment. The reasons I like using an init container as the vehicle for this:
Lgtm 👍
I talked to @andykrohg about this
I like the update center path better from an architectural perspective, but it sounds like Jenkins' implementation of that is not great. They tried it and wound up with failing transitive dependencies. Let's use the sidecar and move forward. When we get to day 2 operations, we'll probably have to revisit this.
I've got this as a WIP for initial review and feedback. My testing so far has been positive but I still have more to do. I figure if this container goes in first and is built, then a follow-up PR can go into the Ploigos operator to change the Jenkins DC to include it as an initContainer.
This container is built with a two-stage process. The first uses the existing Jenkins image so as to use the install-plugins.sh script to pull down the plugins listed in ploigos-plugins.txt. The second stage copies all of these plugins into a ubi-minimal container.
The container can then be used as an initContainer for a Jenkins deployment, with the Jenkins PV mounted into the container. The content can then be copied into $JENKINS_HOME/plugins.
This container can then be shipped into disconnected environments to provide all the required plugins to support Ploigos deployment.