cli: only create resource backups if upgrade is executed (#1437)

Previously backups were created even if no service upgrades were
executed. To allow this some things are restructured:
* new chartInfo type that holds release name, path and chart name
* upgrade execution and version validity are checked separately
This commit is contained in:
Otto Bittner 2023-03-20 14:49:04 +01:00 committed by GitHub
parent 1a0e05c3fb
commit 9e13b0f917
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 143 additions and 104 deletions

View file

@ -109,7 +109,7 @@ func TestConstellationServices(t *testing.T) {
konnectivityImage: "konnectivityImage",
gcpGuestAgentImage: "gcpGuestAgentImage",
}
chart, err := loadChartsDir(helmFS, conServicesPath)
chart, err := loadChartsDir(helmFS, constellationServicesInfo.path)
require.NoError(err)
values, err := chartLoader.loadConstellationServicesValues()
require.NoError(err)
@ -180,7 +180,7 @@ func TestOperators(t *testing.T) {
constellationOperatorImage: "constellationOperatorImage",
nodeMaintenanceOperatorImage: "nodeMaintenanceOperatorImage",
}
chart, err := loadChartsDir(helmFS, conOperatorsPath)
chart, err := loadChartsDir(helmFS, constellationOperatorsInfo.path)
require.NoError(err)
vals, err := chartLoader.loadOperatorsValues()
require.NoError(err)