Add label support to named volumes in docker compose v3 to Kubernetes (#1083)

* Support read specific label (kompose.volume.size) from named volume and apply to kubernetes supported volume size

* Fix the PVC size in log message when deploy Kubernetes

* Skip creation of PersistentVolumeClaim if it is already created in the same kubernetes deploy

* Add selector to PersistentVolumeClaim only when specific label (kompose.volume.selector) is used in named volume

* Add test case to named-volume for the new labels
This commit is contained in:
huikaihoo
2018-11-29 12:07:17 -05:00
committed by Charlie Drage
parent ae44008908
commit d48ae64325
6 changed files with 256 additions and 19 deletions
+10 -9
View File
@@ -143,13 +143,14 @@ type Ports struct {
// Volumes holds the volume struct of container
type Volumes struct {
SvcName string // Service name to which volume is linked
MountPath string // Mountpath extracted from docker-compose file
VFrom string // denotes service name from which volume is coming
VolumeName string // name of volume if provided explicitly
Host string // host machine address
Container string // Mountpath
Mode string // access mode for volume
PVCName string // name of PVC
PVCSize string // PVC size
SvcName string // Service name to which volume is linked
MountPath string // Mountpath extracted from docker-compose file
VFrom string // denotes service name from which volume is coming
VolumeName string // name of volume if provided explicitly
Host string // host machine address
Container string // Mountpath
Mode string // access mode for volume
PVCName string // name of PVC
PVCSize string // PVC size
SelectorValue string // Value of the label selector
}