mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-07 00:35:17 -04:00
Add upgrade path for new/not-installed charts
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
ea5c83587c
commit
9d8e2043a2
4 changed files with 148 additions and 46 deletions
|
@ -151,7 +151,7 @@ func (i *ChartLoader) loadRelease(info chartInfo, helmWaitMode helm.WaitMode) (h
|
|||
return helm.Release{}, fmt.Errorf("loading %s chart: %w", info.releaseName, err)
|
||||
}
|
||||
|
||||
values := map[string]any{}
|
||||
var values map[string]any
|
||||
|
||||
switch info.releaseName {
|
||||
case ciliumInfo.releaseName:
|
||||
|
@ -166,10 +166,7 @@ func (i *ChartLoader) loadRelease(info chartInfo, helmWaitMode helm.WaitMode) (h
|
|||
values = i.loadConstellationServicesValues()
|
||||
case csiInfo.releaseName:
|
||||
updateVersions(chart, compatibility.EnsurePrefixV(constants.VersionInfo()))
|
||||
}
|
||||
|
||||
values["tags"] = map[string]any{
|
||||
i.csp.String(): true,
|
||||
values = i.loadCSIValues()
|
||||
}
|
||||
|
||||
chartRaw, err := i.marshalChart(chart)
|
||||
|
@ -240,6 +237,7 @@ func (i *ChartLoader) loadOperatorsValues() map[string]any {
|
|||
},
|
||||
},
|
||||
},
|
||||
"tags": i.cspTags(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -284,6 +282,19 @@ func (i *ChartLoader) loadConstellationServicesValues() map[string]any {
|
|||
"konnectivity": map[string]any{
|
||||
"image": i.konnectivityImage,
|
||||
},
|
||||
"tags": i.cspTags(),
|
||||
}
|
||||
}
|
||||
|
||||
func (i *ChartLoader) loadCSIValues() map[string]any {
|
||||
return map[string]any{
|
||||
"tags": i.cspTags(),
|
||||
}
|
||||
}
|
||||
|
||||
func (i *ChartLoader) cspTags() map[string]any {
|
||||
return map[string]any{
|
||||
i.csp.String(): true,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue