mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-08 09:15:29 -04:00
cli: check chart versions against target version in users config before upgrading (#2319)
* Check chart versions against target in users config Signed-off-by: Daniel Weiße <dw@edgeless.systems> * Cleaner cli-config version support checking Signed-off-by: Daniel Weiße <dw@edgeless.systems> * Return InvalidUpgradeError Signed-off-by: Daniel Weiße <dw@edgeless.systems> --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
5706e69091
commit
2a1996dbe1
6 changed files with 318 additions and 24 deletions
|
@ -73,7 +73,7 @@ func NewClient(kubeConfigPath string, log debugLog) (*Client, error) {
|
|||
}
|
||||
lister := ReleaseVersionClient{actionConfig}
|
||||
cliVersion := constants.BinaryVersion()
|
||||
factory := newActionFactory(kubeClient, lister, actionConfig, cliVersion, log)
|
||||
factory := newActionFactory(kubeClient, lister, actionConfig, log)
|
||||
return &Client{factory, cliVersion, log}, nil
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ func (h Client) PrepareApply(
|
|||
return nil, false, fmt.Errorf("loading Helm releases: %w", err)
|
||||
}
|
||||
h.log.Debugf("Loaded Helm releases")
|
||||
actions, includesUpgrades, err := h.factory.GetActions(releases, flags.Force, flags.AllowDestructive)
|
||||
actions, includesUpgrades, err := h.factory.GetActions(releases, conf.MicroserviceVersion, flags.Force, flags.AllowDestructive)
|
||||
return &ChartApplyExecutor{actions: actions, log: h.log}, includesUpgrades, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue