-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[kots]: allow deployment whilst installer job running #9471
Conversation
c3f0d47
to
b2abce6
Compare
/werft run no-preview publish-to-kots with-clean-deployment 👍 started the job as gitpod-build-sje-kots-install-cancel.2 |
b2abce6
to
e5f610c
Compare
e5f610c
to
2c5e20e
Compare
2c5e20e
to
edfad6b
Compare
/werft run no-preview publish-to-kots 👍 started the job as gitpod-build-sje-kots-install-cancel.6 |
/werft run no-preview publish-to-kots with-clean-deployment 👍 started the job as gitpod-build-sje-kots-install-cancel.7 |
/werft run no-preview publish-to-kots 👍 started the job as gitpod-build-sje-kots-install-cancel.9 |
99b6af4
to
5c4a263
Compare
2149ecb
to
e3cbae6
Compare
/werft run no-preview publish-to-kots 👍 started the job as gitpod-build-sje-kots-install-cancel.13 |
echo "Gitpod: Killing any in-progress installations" | ||
|
||
kubectl delete jobs.batch -n {{repl Namespace }} -l component=gitpod-installer,cursor!={{repl Cursor }} --force || true | ||
kubectl delete pod -n {{repl Namespace }} -l component=gitpod-installer,cursor!={{repl Cursor }} --force || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a --grace-period=0
could be added too, just to be sure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call
Tested and works like a charm! LGTM! Merging on Friday early evening is bad luck. Will approve on Monday 🤓 |
You are very wise |
e3cbae6
to
52ebc12
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since @nandajavarma is OOO today, I'm happy to add my approval. I am very curious to see how well this works in practice.
Description
Allow deployment whilst an existing Installer job running. This should allow for recovery in the following scenarios:
This appends the cursor to the job name. This is necessary to allow us to change the
image
on the container, effectively replacing the existing job. The first part of this script then removes any already running jobs/pods, thus clearing up the state.It then rolls back (or uninstalls if it's the first deployment) before starting the next
helm upgrade
. For a user, this should then allow them to unstick their issues.Setting of the
ttlSecondsAfterFinished
to0
means that the "redeploy" button works as soon as the job as finishedHow to test
Get your Helm deployment into either a
pending-install
orpending-upgrade
state. The script does this anyway for an upgrade, but to do this manually, suggest starting an install job then running:Ensure by running
helm ls -aA
.Now, run the following - all of these should result in a successful deployment, and will need you to get it to enter the same "pending" state as above:
For regression, we should also test:
helm un -n gitpod gitpod
)Release Notes
Documentation