-
- Downloads
Implements EBS volume resizing #35.
In order to support volumes different from EBS and filesystems other than EXT2/3/4 the respective code parts were implemented as interfaces. Adding the new resize for the volume or the filesystem will require implementing the interface, but no other changes in the cluster code itself. Volume resizing first changes the EBS and the filesystem, and only afterwards is reflected in the Kubernetes "PersistentVolume" object. This is done deliberately to be able to check if the volume needs resizing by peeking at the Size of the PersistentVolume structure. We recheck, nevertheless, in the EBSVolumeResizer, whether the actual EBS volume size doesn't match the spec, since call to the AWS ModifyVolume is counted against the resize limit of once every 6 hours, even for those calls that shouldn't result in an actual resize (i.e. when the size matches the one for the running volume). As a collateral, split the constants into multiple files, move the volume code into a separate file and fix minor issues related to the error reporting.
Showing
- glide.lock 1 addition, 1 deletionglide.lock
- glide.yaml 2 additions, 0 deletionsglide.yaml
- pkg/cluster/cluster.go 44 additions, 33 deletionspkg/cluster/cluster.go
- pkg/cluster/exec.go 2 additions, 2 deletionspkg/cluster/exec.go
- pkg/cluster/filesystems.go 46 additions, 0 deletionspkg/cluster/filesystems.go
- pkg/cluster/k8sres.go 2 additions, 2 deletionspkg/cluster/k8sres.go
- pkg/cluster/pod.go 0 additions, 35 deletionspkg/cluster/pod.go
- pkg/cluster/sync.go 37 additions, 20 deletionspkg/cluster/sync.go
- pkg/cluster/util.go 5 additions, 3 deletionspkg/cluster/util.go
- pkg/cluster/volumes.go 178 additions, 0 deletionspkg/cluster/volumes.go
- pkg/controller/postgresql.go 2 additions, 2 deletionspkg/controller/postgresql.go
- pkg/controller/util.go 1 addition, 0 deletionspkg/controller/util.go
- pkg/util/constants/annotations.go 9 additions, 0 deletionspkg/util/constants/annotations.go
- pkg/util/constants/aws.go 16 additions, 0 deletionspkg/util/constants/aws.go
- pkg/util/constants/kubernetes.go 12 additions, 0 deletionspkg/util/constants/kubernetes.go
- pkg/util/constants/postgresql.go 9 additions, 0 deletionspkg/util/constants/postgresql.go
- pkg/util/constants/roles.go 14 additions, 0 deletionspkg/util/constants/roles.go
- pkg/util/constants/thirdpartyresource.go 9 additions, 0 deletionspkg/util/constants/thirdpartyresource.go
- pkg/util/constants/units.go 5 additions, 0 deletionspkg/util/constants/units.go
- pkg/util/filesystems/ext234.go 38 additions, 0 deletionspkg/util/filesystems/ext234.go
Loading
Please register or sign in to comment