Skip to content

Commit f7439af

Browse files
committed
move crate to module
1 parent 65f323e commit f7439af

File tree

18 files changed

+67
-146
lines changed

18 files changed

+67
-146
lines changed

Cargo.lock

Lines changed: 1 addition & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.nix

Lines changed: 16 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
members = ["rust/crd", "rust/operator-binary"]
2+
members = ["rust/operator-binary"]
33
resolver = "2"
44

55
[workspace.package]

rust/crd/Cargo.toml

Lines changed: 0 additions & 20 deletions
This file was deleted.

rust/operator-binary/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ publish = false
1010
build = "build.rs"
1111

1212
[dependencies]
13-
stackable-zookeeper-crd = { path = "../crd" }
14-
1513
anyhow.workspace = true
1614
clap.workspace = true
1715
const_format.workspace = true
@@ -22,6 +20,7 @@ pin-project.workspace = true
2220
product-config.workspace = true
2321
semver.workspace = true
2422
serde.workspace = true
23+
serde_json.workspace = true
2524
snafu.workspace = true
2625
stackable-operator.workspace = true
2726
strum.workspace = true

rust/operator-binary/src/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use stackable_zookeeper_crd::{STACKABLE_CONFIG_DIR, STACKABLE_DATA_DIR, STACKABLE_RW_CONFIG_DIR};
1+
use crate::crd::{STACKABLE_CONFIG_DIR, STACKABLE_DATA_DIR, STACKABLE_RW_CONFIG_DIR};
22

33
pub fn create_init_container_command_args() -> Vec<String> {
44
vec![

rust/crd/src/affinity.rs renamed to rust/operator-binary/src/crd/affinity.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use stackable_operator::{
33
k8s_openapi::api::core::v1::PodAntiAffinity,
44
};
55

6-
use crate::{ZookeeperRole, APP_NAME};
6+
use crate::crd::{ZookeeperRole, APP_NAME};
77

88
pub fn get_affinity(cluster_name: &str, role: &ZookeeperRole) -> StackableAffinityFragment {
99
let affinity_between_role_pods =
@@ -37,7 +37,7 @@ mod tests {
3737
role_utils::RoleGroupRef,
3838
};
3939

40-
use crate::{ZookeeperCluster, ZookeeperRole};
40+
use crate::{crd::affinity::ZookeeperRole, ZookeeperCluster};
4141

4242
#[test]
4343
fn test_affinity_defaults() {

rust/crd/src/authentication.rs renamed to rust/operator-binary/src/crd/authentication.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use stackable_operator::{
66
schemars::{self, JsonSchema},
77
};
88

9-
use crate::ObjectRef;
9+
use crate::crd::ObjectRef;
1010

1111
const SUPPORTED_AUTHENTICATION_CLASS: [&str; 1] = ["TLS"];
1212

rust/crd/src/lib.rs renamed to rust/operator-binary/src/crd/mod.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ use stackable_operator::{
3535
};
3636
use strum::{Display, EnumIter, EnumString, IntoEnumIterator};
3737

38-
use crate::{affinity::get_affinity, authentication::ZookeeperAuthentication, tls::ZookeeperTls};
38+
use crate::crd::{
39+
affinity::get_affinity, authentication::ZookeeperAuthentication, tls::ZookeeperTls,
40+
};
3941

4042
pub mod affinity;
4143
pub mod authentication;
@@ -471,7 +473,10 @@ impl ZookeeperCluster {
471473
let version = self
472474
.spec
473475
.image
474-
.resolve(DOCKER_IMAGE_BASE_NAME, crate::built_info::CARGO_PKG_VERSION)
476+
.resolve(
477+
DOCKER_IMAGE_BASE_NAME,
478+
crate::crd::built_info::CARGO_PKG_VERSION,
479+
)
475480
.product_version;
476481
let zookeeper_versions_with_log4j = [
477482
"1.", "2.", "3.0.", "3.1.", "3.2.", "3.3.", "3.4.", "3.5.", "3.6.", "3.7.",

rust/crd/src/security.rs renamed to rust/operator-binary/src/crd/security.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ use stackable_operator::{
2525
time::Duration,
2626
};
2727

28-
use crate::{authentication, authentication::ResolvedAuthenticationClasses, tls, ZookeeperCluster};
28+
use crate::crd::{
29+
authentication, authentication::ResolvedAuthenticationClasses, tls, ZookeeperCluster,
30+
};
2931

3032
type Result<T, E = Error> = std::result::Result<T, E>;
3133

0 commit comments

Comments
 (0)