Add more output.
This commit is contained in:
parent
b3ca63c029
commit
b44ac2f065
|
|
@ -140,7 +140,7 @@ func New(cfg Config, kubeClient k8sutil.KubernetesClient, pgSpec acidv1.Postgres
|
||||||
cluster.eventRecorder = eventRecorder
|
cluster.eventRecorder = eventRecorder
|
||||||
|
|
||||||
cluster.EBSVolumes = make(map[string]volumes.VolumeProperties)
|
cluster.EBSVolumes = make(map[string]volumes.VolumeProperties)
|
||||||
if cfg.OpConfig.StorageResizeMode != "pvc" {
|
if cfg.OpConfig.StorageResizeMode != "pvc" || cfg.OpConfig.EnableEBSGp3Migration {
|
||||||
cluster.VolumeResizer = &volumes.EBSVolumeResizer{AWSRegion: cfg.OpConfig.AWSRegion}
|
cluster.VolumeResizer = &volumes.EBSVolumeResizer{AWSRegion: cfg.OpConfig.AWSRegion}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -262,6 +262,7 @@ func (c *Cluster) executeEBSMigration() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not list persistent volumes: %v", err)
|
return fmt.Errorf("could not list persistent volumes: %v", err)
|
||||||
}
|
}
|
||||||
|
c.logger.Debugf("found %d volumes, size of known volumes %d", len(pvs), len(c.EBSVolumes))
|
||||||
|
|
||||||
volumeIds := []string{}
|
volumeIds := []string{}
|
||||||
for _, pv := range pvs {
|
for _, pv := range pvs {
|
||||||
|
|
@ -284,6 +285,9 @@ func (c *Cluster) executeEBSMigration() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
awsVolumes, err := c.VolumeResizer.DescribeVolumes(volumeIds)
|
awsVolumes, err := c.VolumeResizer.DescribeVolumes(volumeIds)
|
||||||
|
if nil != err {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
for _, volume := range awsVolumes {
|
for _, volume := range awsVolumes {
|
||||||
if volume.VolumeType == "gp2" && volume.Size < c.OpConfig.EnableEBSGp3MaxSize {
|
if volume.VolumeType == "gp2" && volume.Size < c.OpConfig.EnableEBSGp3MaxSize {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue