Skip to content

Commit

Permalink
fix 1692 set backup target is configured flag
Browse files Browse the repository at this point in the history
  • Loading branch information
w13915984028 authored and gitlawr committed Dec 17, 2021
1 parent 935a167 commit e50975f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/controller/master/backup/backup_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ func (h *TargetHandler) OnBackupTargetChange(key string, setting *harvesterv1.Se
return nil, err
}

// set configured flag, as s3 does
harvesterv1.SettingConfigured.SetError(setting, "", nil)

return nil, nil

default:
Expand Down Expand Up @@ -138,6 +141,9 @@ func (h *TargetHandler) reUpdateBackupTargetSettingSecret(setting *harvesterv1.S
return nil, nil
}

// set configured flag
harvesterv1.SettingConfigured.SetError(setting, "", nil)

// reset the s3 credentials to prevent controller reconcile and not to expose secret key
target.SecretAccessKey = ""
target.AccessKeyID = ""
Expand Down

0 comments on commit e50975f

Please sign in to comment.