Skip to content

Commit 5f2d693

Browse files
committed
adjust crd printing command
1 parent b3ae7bd commit 5f2d693

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

rust/operator-binary/src/main.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::sync::Arc;
22

33
use clap::{crate_description, crate_version, Parser};
4-
use crd::{v1alpha1, APP_NAME, OPERATOR_NAME};
4+
use crd::{v1alpha1, ZookeeperCluster, ZookeeperZnode, APP_NAME, OPERATOR_NAME};
55
use futures::{pin_mut, StreamExt};
66
use stackable_operator::{
77
cli::{Command, ProductOperatorRun},
@@ -19,7 +19,8 @@ use stackable_operator::{
1919
Resource,
2020
},
2121
logging::controller::report_controller_reconciled,
22-
CustomResourceExt,
22+
shared::yaml::SerializeOptions,
23+
YamlSchema,
2324
};
2425

2526
use crate::{zk_controller::ZK_FULL_CONTROLLER_NAME, znode_controller::ZNODE_FULL_CONTROLLER_NAME};
@@ -51,8 +52,10 @@ async fn main() -> anyhow::Result<()> {
5152
let opts = Opts::parse();
5253
match opts.cmd {
5354
Command::Crd => {
54-
v1alpha1::ZookeeperCluster::print_yaml_schema(built_info::CARGO_PKG_VERSION)?;
55-
v1alpha1::ZookeeperZnode::print_yaml_schema(built_info::CARGO_PKG_VERSION)?;
55+
ZookeeperCluster::merged_crd(ZookeeperCluster::V1Alpha1)?
56+
.print_yaml_schema(built_info::CARGO_PKG_VERSION, SerializeOptions::default())?;
57+
ZookeeperZnode::merged_crd(ZookeeperZnode::V1Alpha1)?
58+
.print_yaml_schema(built_info::CARGO_PKG_VERSION, SerializeOptions::default())?;
5659
}
5760
Command::Run(ProductOperatorRun {
5861
product_config,

0 commit comments

Comments
 (0)