forked from LaconicNetwork/kompose
correct display when using --emptyvols
This commit is contained in:
parent
6449dd4830
commit
62c34a2208
@ -378,7 +378,11 @@ func (k *Kubernetes) Deploy(komposeObject kobject.KomposeObject, opt kobject.Con
|
|||||||
//Convert komposeObject
|
//Convert komposeObject
|
||||||
objects := k.Transform(komposeObject, opt)
|
objects := k.Transform(komposeObject, opt)
|
||||||
|
|
||||||
fmt.Println("We are going to create Kubernetes Deployments, Services and PersistentVolumeClaims for your Dockerized application. \n" +
|
pvcStr := " "
|
||||||
|
if !opt.EmptyVols {
|
||||||
|
pvcStr = " and PersistentVolumeClaims "
|
||||||
|
}
|
||||||
|
fmt.Println("We are going to create Kubernetes Deployments, Services" +pvcStr+ "for your Dockerized application. \n" +
|
||||||
"If you need different kind of resources, use the 'kompose convert' and 'kubectl create -f' commands instead. \n")
|
"If you need different kind of resources, use the 'kompose convert' and 'kubectl create -f' commands instead. \n")
|
||||||
|
|
||||||
factory := cmdutil.NewFactory(nil)
|
factory := cmdutil.NewFactory(nil)
|
||||||
@ -414,7 +418,13 @@ func (k *Kubernetes) Deploy(komposeObject kobject.KomposeObject, opt kobject.Con
|
|||||||
logrus.Infof("Successfully created PersistentVolumeClaim: %s", t.Name)
|
logrus.Infof("Successfully created PersistentVolumeClaim: %s", t.Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Println("\nYour application has been deployed to Kubernetes. You can run 'kubectl get deployment,svc,pods,pvc' for details.")
|
|
||||||
|
if !opt.EmptyVols {
|
||||||
|
pvcStr = ",pvc"
|
||||||
|
} else {
|
||||||
|
pvcStr = ""
|
||||||
|
}
|
||||||
|
fmt.Println("\nYour application has been deployed to Kubernetes. You can run 'kubectl get deployment,svc,pods" +pvcStr+ "' for details.")
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -174,8 +174,11 @@ func (o *OpenShift) Transform(komposeObject kobject.KomposeObject, opt kobject.C
|
|||||||
func (o *OpenShift) Deploy(komposeObject kobject.KomposeObject, opt kobject.ConvertOptions) error {
|
func (o *OpenShift) Deploy(komposeObject kobject.KomposeObject, opt kobject.ConvertOptions) error {
|
||||||
//Convert komposeObject
|
//Convert komposeObject
|
||||||
objects := o.Transform(komposeObject, opt)
|
objects := o.Transform(komposeObject, opt)
|
||||||
|
pvcStr := " "
|
||||||
fmt.Println("We are going to create OpenShift DeploymentConfigs, Services and PersistentVolumeClaims for your Dockerized application. \n" +
|
if !opt.EmptyVols {
|
||||||
|
pvcStr = " and PersistentVolumeClaims "
|
||||||
|
}
|
||||||
|
fmt.Println("We are going to create OpenShift DeploymentConfigs, Services" +pvcStr+ "for your Dockerized application. \n" +
|
||||||
"If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead. \n")
|
"If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead. \n")
|
||||||
|
|
||||||
// initialize OpenShift Client
|
// initialize OpenShift Client
|
||||||
@ -229,7 +232,13 @@ func (o *OpenShift) Deploy(komposeObject kobject.KomposeObject, opt kobject.Conv
|
|||||||
logrus.Infof("Successfully created PersistentVolumeClaim: %s", t.Name)
|
logrus.Infof("Successfully created PersistentVolumeClaim: %s", t.Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Println("\nYour application has been deployed to OpenShift. You can run 'oc get dc,svc,is,pvc' for details.")
|
|
||||||
|
if !opt.EmptyVols {
|
||||||
|
pvcStr = ",pvc"
|
||||||
|
} else {
|
||||||
|
pvcStr = ""
|
||||||
|
}
|
||||||
|
fmt.Println("\nYour application has been deployed to OpenShift. You can run 'oc get dc,svc,is" +pvcStr+ "' for details.")
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user