Skip to content

Commit

Permalink
Add csv-generator --dump-crds option (kubevirt#201)
Browse files Browse the repository at this point in the history
Add csv-generator --dump-crds option
  • Loading branch information
phoracek authored Aug 2, 2019
2 parents 237fd5d + 8efea31 commit 75c1831
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/manifest-templator/manifest-templator.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"bufio"
"encoding/json"
"flag"
"fmt"
"io"
"os"
"strings"
Expand Down Expand Up @@ -225,6 +226,7 @@ func main() {
nmStateHandlerImage := flag.String("nm-state-handler-image", components.NMStateHandlerImageDefault, "The nmstate handler image managed by CNA")
ovsCniImage := flag.String("ovs-cni-image", components.OvsCniImageDefault, "The ovs cni image managed by CNA")
ovsMarkerImage := flag.String("ovs-marker-image", components.OvsMarkerImageDefault, "The ovs marker image managed by CNA")
dumpOperatorCRD := flag.Bool("dump-crds", false, "Append operator CRD to bottom of template. Used for csv-generator")
inputFile := flag.String("input-file", "", "Not used for csv-generator")
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.CommandLine.ParseErrorsWhitelist.UnknownFlags = true
Expand Down Expand Up @@ -260,4 +262,8 @@ func main() {
manifestTemplate := template.Must(template.ParseFiles(*inputFile))
err := manifestTemplate.Execute(os.Stdout, data)
check(err)

if *dumpOperatorCRD {
fmt.Printf(data.CNA.CRDString)
}
}

0 comments on commit 75c1831

Please sign in to comment.