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

Use Deployment objects instead of Pod to manage jenkins instances lifecycle #195

Open
akram opened this issue Nov 14, 2019 · 7 comments
Open
Labels
enhancement New feature or request not-stale
Milestone

Comments

@akram
Copy link

akram commented Nov 14, 2019

Currently the jenkins operator monitors pod configuration changes and performs restarts of pods in case of a change. Also, it monitors the existence of the pod and recreates it if it deleted.
Kubernetes provides Deployment object to perform these 2 features [1].

It would be preferable if the jenkins-operator instantiates a Deployment object and lets the kubernetes Deployment Controller manage the pod lifecycle.

[1] https://kubernetes.io/docs/concepts/workloads/controllers/deployment/

@akram akram changed the title Use Deployment objects instead for Pod to manage jenkins instances lifecycle Use Deployment objects instead of Pod to manage jenkins instances lifecycle Nov 14, 2019
@tomaszsek
Copy link

Pod gives full control of the Jenkins. I have an idea to spin up two pods at the same time and switch traffic from one to another when the old one needs to be killed. With deployment you can't do this.

@pawelprazak
Copy link

I wonder if we could leverage the deployment controller and still do the blue-green deployment

@pawelprazak pawelprazak added enhancement New feature or request question Further information is requested labels Nov 14, 2019
@akram
Copy link
Author

akram commented Nov 14, 2019

Rolling-update allows indeed to achieve blue/green deployment.
Deployment are backed with ReplicaSet which are controlled by replication controller.
And the replication controller supports the rolling update feature [1]
We have to pay attention at 2 things:

  • the volume type / access mode which must support RWX mode (Read Write by multiple pods at a time)
  • define properly liveness and readinessprobe which determines the triggers to switch traffic to the new pod

https://kubernetes.io/docs/tasks/run-application/rolling-update-replication-controller/

@waveywaves
Copy link
Member

@tomaszsek can you assign this to me ?

@triesz
Copy link

triesz commented Aug 7, 2020

hi @tomaszsek, @waveywaves et al, sorry, I am slightly late on the show, but would it not be more beneficial to use StatefulSet instead of Deployment? I.e. volumeClaimTemplates would allow stable storage...
https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage

@snooyen
Copy link

snooyen commented Aug 10, 2020

@tomaszsek @waveywaves

Any movement on this? Is there any way I can help move this along?

@stale
Copy link

stale bot commented Jul 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still affecting you, just comment with any updates and we'll keep it open. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request not-stale
Projects
None yet
Development

No branches or pull requests

8 participants