This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli/cmd/cluster: ensure controlplane charts are working before upgrade
This commit modifies logic of 'lokoctl cluster apply' to run equivalent of 'helm rollback <last release name>' before running 'terraform apply' to ensure that all controlplane charts are up to date with existing configuration and that they are healthy before we proceed with upgrades. This is a safety measure to avoid trying to upgrade the cluster, which is not healthy, which can only make situation worse. If controlplane chart is not installed, we attempt to re-install it from cluster assets directory. If chart is not found there, we bail, as we have no way of knowing if binary we run right now is the same binary which was previously used to deploy a cluster and we don't want to trigger cluster upgrade until we make sure that existing cluster is healthy. In such case, user should clone 'lokomotive' repository, copy the right version of the Helm chart into their assets directory and then re-run 'lokoctl cluster apply'. This will change when we decouple Lokomotive release from 'lokoctl' binary, as then we will have access to the right Helm charts. Signed-off-by: Mateusz Gozdek <[email protected]>
- Loading branch information
Showing
3 changed files
with
68 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters