Add --volumes parameter, deprecate emptyvols

This adds the --volumes paramater with a "generate" and "empty"

By default, "generate" will be used as a place-holder for "true".
Although not used in the code, we will eventually add "none"

This uses CLI paramater naming processes (no emptyVols as that is Go /
Kubernetes specific) and thus we use dashes.
This commit is contained in:
Charlie Drage
2017-09-05 11:39:57 -04:00
parent faa844a733
commit cc1671aaa9
7 changed files with 195 additions and 6 deletions
+2 -2
View File
@@ -425,7 +425,7 @@ func (o *OpenShift) Deploy(komposeObject kobject.KomposeObject, opt kobject.Conv
}
pvcStr := " "
if !opt.EmptyVols {
if !opt.EmptyVols || opt.Volumes != "emptyDir" {
pvcStr = " and PersistentVolumeClaims "
}
log.Info("We are going to create OpenShift DeploymentConfigs, Services" + pvcStr + "for your Dockerized application. \n" +
@@ -493,7 +493,7 @@ func (o *OpenShift) Deploy(komposeObject kobject.KomposeObject, opt kobject.Conv
}
}
if !opt.EmptyVols {
if !opt.EmptyVols || opt.Volumes != "emptyDir" {
pvcStr = ",pvc"
} else {
pvcStr = ""