Add "--pvc-request-size" new command line parameter (#1406)

This commit is contained in:
ithaiq
2021-08-07 14:47:02 +08:00
committed by GitHub
parent 33b646c116
commit b605fd986c
8 changed files with 679 additions and 2 deletions
+1
View File
@@ -58,6 +58,7 @@ type ConvertOptions struct {
StoreManifest bool
EmptyVols bool
Volumes string
PVCRequestSize string
InsecureRepository bool
Replicas int
InputFiles []string
+3 -1
View File
@@ -845,7 +845,9 @@ func (k *Kubernetes) ConfigVolumes(name string, service kobject.ServiceConfig) (
volsource = k.ConfigPVCVolumeSource(volumeName, readonly)
if volume.VFrom == "" {
defaultSize := PVCRequestSize
if k.Opt.PVCRequestSize != "" {
defaultSize = k.Opt.PVCRequestSize
}
if len(volume.PVCSize) > 0 {
defaultSize = volume.PVCSize
} else {