mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-12 00:40:25 -04:00
cli: fix incorrect file path for master secret during upgrades when using workspace flag (#2249)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
dfe7c9884b
commit
c2bb884a04
14 changed files with 54 additions and 52 deletions
|
@ -288,8 +288,8 @@ func (u *upgradeApplyCmd) migrateTerraform(
|
|||
|
||||
cmd.Printf("Terraform migrations applied successfully and output written to: %s\n"+
|
||||
"A backup of the pre-upgrade state has been written to: %s\n",
|
||||
flags.pf.PrefixPath(constants.ClusterIDsFilename),
|
||||
flags.pf.PrefixPath(filepath.Join(opts.UpgradeWorkspace, u.terraformUpgrader.UpgradeID(), constants.TerraformUpgradeBackupDir)),
|
||||
flags.pf.PrefixPrintablePath(constants.ClusterIDsFilename),
|
||||
flags.pf.PrefixPrintablePath(filepath.Join(opts.UpgradeWorkspace, u.terraformUpgrader.UpgradeID(), constants.TerraformUpgradeBackupDir)),
|
||||
)
|
||||
} else {
|
||||
u.log.Debugf("No Terraform diff detected")
|
||||
|
@ -381,7 +381,7 @@ func (u *upgradeApplyCmd) confirmIfUpgradeAttestConfigHasDiff(cmd *cobra.Command
|
|||
|
||||
func (u *upgradeApplyCmd) handleServiceUpgrade(cmd *cobra.Command, conf *config.Config, idFile clusterid.File, tfOutput terraform.ApplyOutput, validK8sVersion versions.ValidK8sVersion, flags upgradeApplyFlags) error {
|
||||
var secret uri.MasterSecret
|
||||
if err := u.fileHandler.ReadJSON(flags.pf.PrefixPath(constants.MasterSecretFilename), &secret); err != nil {
|
||||
if err := u.fileHandler.ReadJSON(constants.MasterSecretFilename, &secret); err != nil {
|
||||
return fmt.Errorf("reading master secret: %w", err)
|
||||
}
|
||||
serviceAccURI, err := cloudcmd.GetMarshaledServiceAccountURI(conf.GetProvider(), conf, flags.pf, u.log, u.fileHandler)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue