To maintain Steward you can put the system in maintenance mode. In this mode running pipeline runs will be processed to the end. Newly created pipeline runs will stay untouched.
- Put Steward in maintenance mode
- Wait until already started pipeline runs are finished
- Install the new version of Steward
- Switch off 'maintenance mode'
To put the system in maintenance mode you need to create a config map in the system namespace with specific content. See the file 'maintenance_mode_on.yaml' in this directory as an example.
kubectl apply -n steward-system -f maintenance_mode_on.yaml
You can list all non-finished pipelines with the following command:
kubectl get spr --all-namespaces | grep -v finished
The installation can start when there are no pipeline runs at all or all pipeline runs are in one of these states:
- finished
For each pipeline run without state you can also see an event with reason 'MaintenanceMode':
kubectl get event -n "$TENANT_NAMESPACE"
LAST SEEN TYPE REASON OBJECT MESSAGE
12s Normal MaintenanceMode pipelinerun/ok-n9lcl Maintenance mode skip
To switch off the maintenance mode you can either delete the created config map:
kubectl delete -n steward-system -f maintenance_mode_on.yaml
or set maintenanceMode: "false"
:
kubectl apply -n steward-system -f maintenance_mode_off.yaml