Skip to content

Commit 414d79b

Browse files
authored
Merge pull request #38 from demeter-run/chore/add-crdgen-json-output
Implemented crdgen json output
2 parents 6f863e7 + 64ebb18 commit 414d79b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

operator/src/crdgen.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
use kube::CustomResourceExt;
22

33
fn main() {
4+
let args: Vec<String> = std::env::args().collect();
5+
if args.len() > 1 && args[1] == "json" {
6+
print!(
7+
"{}",
8+
serde_json::to_string_pretty(&operator::SubmitApiPort::crd()).unwrap()
9+
);
10+
return;
11+
}
12+
413
print!(
514
"{}",
615
serde_yaml::to_string(&operator::SubmitApiPort::crd()).unwrap()

0 commit comments

Comments
 (0)