mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-23 00:10:06 -05:00
cli: allow upgrade to succeed if desired attestation config == actual config (#2094)
This commit is contained in:
parent
ef404b5839
commit
37af5f5f50
@ -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…
x
Reference in New Issue
Block a user