mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-09-22 14:04:53 -04:00
cli: allow upgrade to succeed if desired attestation config == actual config (#2094)
This commit is contained in:
parent
4ceea6e3f1
commit
f96308b23e
1 changed files with 5 additions and 1 deletions
|
@ -345,9 +345,13 @@ func (u *upgradeApplyCmd) upgradeAttestConfigIfDiff(cmd *cobra.Command, newConfi
|
||||||
return fmt.Errorf("getting cluster attestation config: %w", err)
|
return fmt.Errorf("getting cluster attestation config: %w", err)
|
||||||
}
|
}
|
||||||
// If the current config is equal, or there is an error when comparing the configs, we skip the upgrade.
|
// If the current config is equal, or there is an error when comparing the configs, we skip the upgrade.
|
||||||
if equal, err := newConfig.EqualTo(clusterAttestationConfig); err != nil || equal {
|
equal, err := newConfig.EqualTo(clusterAttestationConfig)
|
||||||
|
if err != nil {
|
||||||
return fmt.Errorf("comparing attestation configs: %w", err)
|
return fmt.Errorf("comparing attestation configs: %w", err)
|
||||||
}
|
}
|
||||||
|
if equal {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if !flags.yes {
|
if !flags.yes {
|
||||||
ok, err := askToConfirm(cmd, "You are about to change your cluster's attestation config. Are you sure you want to continue?")
|
ok, err := askToConfirm(cmd, "You are about to change your cluster's attestation config. Are you sure you want to continue?")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue