This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1.2.x] fix: Make sure to use backward-compatible names for resources…
… created by the operator [RHIDP-2432] (#377) * Add test highlighting the issue and setting the expectations * Revert the DB StatefulSet name for backward compatibility with 1.1 Otherwise, when upgrading from 1.1, a new StatefulSet would be created with a new data PVC, causing the application to boot with from a brand new database. This would break the upgrade path. * Make sure to use backward compatible names for all resources This generalizes the previous commit, as I realized that, otherwise, we might actually be creating duplicate resources like app-config ConfigMaps/Secrets/Services with different names (while keeping the existing ones), which might confuse people upgrading from 1.1. This makes sure we avoid such a similar situation in the future by ensuring naming is done in a backward-compatible manner. * Handle patch error and delete StatefulSet so it can be recreated Some resources like StatefulSets allow patching a limited set of fields. For cases where we are upgrading existing instances, we might need to change the StatefulSet spec. The recommended approach to doing this is to delete the existing StatefulSet, but keep its dependents (like PVCs and Pods) orphan, then recreate the StatefulSet. This way, it will be upgraded (with some downtime) with no data loss. * Revert "Make sure to use backward compatible names for all resources" This reverts commit 0b1be1c2720d96dd6bdd60f230e66819b2bc9e4b. * Address review comments on testing Co-authored-by: Gennady Azarenkov <[email protected]> * Revert useless change to integration_tests/suite_test.go * Address review comments on testing Co-authored-by: Gennady Azarenkov <[email protected]> --------- Co-authored-by: Armel Soro <[email protected]> Co-authored-by: Gennady Azarenkov <[email protected]>
- Loading branch information
1 parent
82c0556
commit 5c75a88
Showing
10 changed files
with
102 additions
and
28 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
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
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
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