Skip to content

Commit a037948

Browse files
authored
chore: implemented crdgen json output (#19)
1 parent 2fb3313 commit a037948

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::ScrollsPort::crd()).unwrap()
9+
);
10+
return;
11+
}
12+
413
print!(
514
"{}",
615
serde_yaml::to_string(&operator::ScrollsPort::crd()).unwrap()

0 commit comments

Comments
 (0)