mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-02 18:14:04 +02:00
improve resilience and performance from AI review
This commit is contained in:
@@ -215,16 +215,16 @@ func (r *EBSVolumeResizer) ModifyVolume(volumeID string, newType *string, newSiz
|
||||
|
||||
// TagVolumes tags the given EBS volumes with the provided tags.
|
||||
func (r *EBSVolumeResizer) TagVolumes(volumeIds []string, tags map[string]string) error {
|
||||
if len(volumeIds) == 0 || len(tags) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
if !r.IsConnectedToProvider() {
|
||||
if err := r.ConnectToProvider(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(volumeIds) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
ec2Tags := make([]types.Tag, 0, len(tags))
|
||||
for key, value := range tags {
|
||||
k, v := key, value
|
||||
|
||||
Reference in New Issue
Block a user