Closed ericgraf closed 9 months ago
For this change there are still two things I'm still not sure about.
@ericgraf Thanks for the PR.
Where is it best to documentation about this change and how to use it?
Our documentation is generated from here: https://github.com/project-zot/project-zot.github.io Perhaps best to add an article here.
I didn't add any e2e helm unittest. Do you have an example of how I could that for this change?
Maybe take two versions, start with the first one and upgrade to the next one. However, note that upgrades are enforced to happen within the same major version. For example, 2.0.1 -> 3.0.5 is risky!
Thank you @rchincha . I moved this PR back to draft until I have those two things done.
@rchincha I added two tests in this PR.
One that follows the current ct install
workflow and another one that introduces a ct install --upgrade
step in the github actions workflow.
The second one is a bit different, so let me know what you think about doing it this way.
@Andreea-Lupu pls review this as well.
@ericgraf thanks for updating the documentation as well. https://github.com/project-zot/project-zot.github.io/pull/158
What type of PR is this?
Feature
Which issue does this PR fix:
What does this PR do / Why do we need it:
This PR introduces the ability to specify the upgrade strategy of the Zot deployment.
Strategy recreate needs to be set when trying to upgrade a single replica deployment with a PV defined.
In ReadWriteOnce accessMode pvcs the new pod will be stuck in creating until the pod with the pvc is manually deleted. In ReadWriteMany accessMode pvcs the new pod will go into a crash loop with the error
operation timeout: boltdb file is already in use
.If an issue # is not available please add repro steps and logs showing the issue:
Run the below commands to repoduce the failure.
New Pod is in a bad state
Crash looping pod error logs:
Testing done on this change:
The below commands were run with code from this PR. The deployment strategy is set to recreate in the commands which allowed the deployment to successfully scale down the old replicaset, then spins up the new replicaset.
Final state after doing the upgrade test.
Automation added to e2e:
Two new tests were added:
Will this break upgrades or downgrades? No. This change sets the values in values.yaml to the deployment strategy values in the values,yaml file.
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.