Add flag to support store manifest when kompose up (#1208)

This commit is contained in:
Hang Yan
2019-12-26 19:30:03 +08:00
committed by GitHub
parent bc28ffc675
commit e0c8f6d23d
3 changed files with 11 additions and 0 deletions
+7
View File
@@ -1210,6 +1210,13 @@ func (k *Kubernetes) Deploy(komposeObject kobject.KomposeObject, opt kobject.Con
return errors.Wrap(err, "k.Transform failed")
}
if opt.StoreManifest {
log.Info("Store manifest to disk")
if err := PrintList(objects, opt); err != nil {
return errors.Wrap(err, "Store manifest failed")
}
}
pvcStr := " "
if !opt.EmptyVols || opt.Volumes != "emptyDir" {
pvcStr = " and PersistentVolumeClaims "