Skip to content

Commit

Permalink
Remove the relatedImages field from the CRD
Browse files Browse the repository at this point in the history
CRD should not contain the relatedImages field.

Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
  • Loading branch information
nunnatsa authored and kubevirt-bot committed Apr 14, 2021
1 parent 7e5ee17 commit b4d1991
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hack/csv-generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func runGenerator() error {
return err
}

err = marshallObject(crd, relatedImages, os.Stdout)
err = marshallObject(crd, nil, os.Stdout)
if err != nil {
return err
}
Expand Down Expand Up @@ -327,7 +327,9 @@ func marshallObject(obj interface{}, relatedImages []interface{}, writer io.Writ
unstructured.SetNestedSlice(r.Object, deployments, "spec", "install", "spec", "deployments")
}

unstructured.SetNestedSlice(r.Object, relatedImages, "spec", "relatedImages")
if len(relatedImages) > 0 {
unstructured.SetNestedSlice(r.Object, relatedImages, "spec", "relatedImages")
}

jsonBytes, err = json.Marshal(r.Object)
if err != nil {
Expand Down

0 comments on commit b4d1991

Please sign in to comment.