Remove code for parsing DAB files (#1435)

* Remove code for parsing DAB files

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
This commit is contained in:
Shivam Sandbhor
2021-10-01 19:16:09 +08:00
committed by GitHub
parent a4c784d7ee
commit 41cd3108d9
8 changed files with 6 additions and 374 deletions
+1 -14
View File
@@ -53,10 +53,7 @@ const (
var inputFormat = "compose"
// ValidateFlags validates all command line flags
func ValidateFlags(bundle string, args []string, cmd *cobra.Command, opt *kobject.ConvertOptions) {
// Check to see if the "file" has changed from the default flag value
isFileSet := cmd.Flags().Lookup("file").Changed
func ValidateFlags(args []string, cmd *cobra.Command, opt *kobject.ConvertOptions) {
if opt.OutFile == "-" {
opt.ToStdout = true
opt.OutFile = ""
@@ -127,16 +124,6 @@ func ValidateFlags(bundle string, args []string, cmd *cobra.Command, opt *kobjec
log.Fatalf("Error: --replicas cannot be negative")
}
if len(bundle) > 0 {
inputFormat = "bundle"
log.Fatalf("DAB / bundle (--bundle | -b) is no longer supported. See issue: https://github.com/kubernetes/kompose/issues/390")
opt.InputFiles = []string{bundle}
}
if len(bundle) > 0 && isFileSet {
log.Fatalf("Error: 'compose' file and 'dab' file cannot be specified at the same time")
}
if len(args) != 0 {
log.Fatal("Unknown Argument(s): ", strings.Join(args, ","))
}