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

Bake additional cert into Jenkins controller image #775

Merged
merged 5 commits into from
Nov 29, 2022

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Nov 25, 2022

Just like we did for the agent image, play a similar trick to have the
additional cert baked into the controller image. This is required if we
need to fetch resources from HTTPS URLs covered by the root CA in code
that runs directly on the controller. This situation comes up in RHCOS
where we want to be able to load the pipecfg from an internal repo early
on in jobs.

@dustymabe
Copy link
Member

I don't really have a good grasp of the jenkins architecture here so it might help to name things a little more explicitly to try to hint at what the architecture is. How about we go for something like jenkins-with-cert-layer since it gets built on top of for the jenkins build. Then jenkins-agent-with-cert for the jenkins agent build. No layer there since it's not built on top of.

I wouldn't be opposed to putting controller in the name of the controller image either so that we properly are operating on either the agent or controller and it's clearer.

@jlebon
Copy link
Member Author

jlebon commented Nov 28, 2022

I like the with-cert idea. It's a bit wordy, but clear. I find the layer wording confusing though. I think it'd be clearer if we remain consistent with the canonical OpenShift images? The two images are jenkins and jenkins-agent-base. So WDYT about:

  • jenkins-with-cert
  • jenkins-agent-base-with-cert

?

IOW, this is saying "these are the same as the regular OpenShift images, except they have a cert added". And then we rename our S2I buildconfig and output to jenkins-s2i. It's confusing to have it named just jenkins.

And I'll add a diagram somewhere showing how they're connected.

@dustymabe
Copy link
Member

yeah let's try that and see what it looks like in the next upload.

The `jenkins-agent` BuildConfig outputs an image that is basically the
same as the `jenkins-agent-base` image from OpenShift but with a cert,
so use `jenkins-agent-base-with-cert` as its name to be clear.

While we're here, rename the template filename to `jenkins-with-cert` to
match (a future patch will add another buildconfig in there for the
controller too).
Prep for next patch where we use this tag not just for the agent.
Just like we did for the agent image, play a similar trick to have the
additional cert baked into the controller image. This is required if we
need to fetch resources from HTTPS URLs covered by the root CA in code
that runs directly on the controller. This situation comes up in RHCOS
where we want to be able to load the pipecfg from an internal repo early
on in jobs.
The `jenkins` word is overloaded. Add `-s2i` to make it clear this is
the S2I build. This also matches the template name and filename it's
part of.
This adds a diagram to make it easier to picture how the different
imagestreams and buildconfigs are connected.
@jlebon
Copy link
Member Author

jlebon commented Nov 28, 2022

Updated this now with better naming and a diagram!

@dustymabe
Copy link
Member

Looks much better now. Thanks for the diagram!

Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jlebon jlebon merged commit 5840fe1 into coreos:main Nov 29, 2022
@jlebon jlebon deleted the pr/controller-cert branch November 29, 2022 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants