Skip to content

Commit 14d6bf3

Browse files
committed
chore: Remove separate CRD crate
1 parent cefde43 commit 14d6bf3

File tree

17 files changed

+87
-134
lines changed

17 files changed

+87
-134
lines changed

Cargo.lock

Lines changed: 7 additions & 23 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 & 25 deletions
This file was deleted.

rust/operator-binary/Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ repository.workspace = true
99
publish = false
1010

1111
[dependencies]
12-
stackable-spark-k8s-crd = { path = "../crd" }
13-
1412
anyhow.workspace = true
13+
const_format.workspace = true
1514
product-config.workspace = true
1615
semver.workspace = true
1716
serde.workspace = true
@@ -26,5 +25,9 @@ clap.workspace = true
2625
futures.workspace = true
2726
tokio.workspace = true
2827

28+
[dev-dependencies]
29+
indoc.workspace = true
30+
rstest.workspace = true
31+
2932
[build-dependencies]
3033
built.workspace = true
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::constants::{APP_NAME, HISTORY_ROLE_NAME};
6+
use crate::crd::constants::{APP_NAME, HISTORY_ROLE_NAME};
77

88
pub fn history_affinity(cluster_name: &str) -> StackableAffinityFragment {
99
let affinity_between_role_pods =
@@ -36,7 +36,7 @@ mod test {
3636
role_utils::RoleGroupRef,
3737
};
3838

39-
use crate::{constants::HISTORY_ROLE_NAME, history::SparkHistoryServer};
39+
use crate::crd::{constants::HISTORY_ROLE_NAME, history::SparkHistoryServer};
4040

4141
#[test]
4242
pub fn test_history_affinity_defaults() {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use stackable_operator::{
3030
};
3131
use strum::{Display, EnumIter};
3232

33-
use crate::{affinity::history_affinity, constants::*, logdir::ResolvedLogDir};
33+
use crate::crd::{affinity::history_affinity, constants::*, logdir::ResolvedLogDir};
3434

3535
#[derive(Snafu, Debug)]
3636
pub enum Error {
@@ -484,7 +484,7 @@ mod test {
484484
};
485485

486486
use super::*;
487-
use crate::logdir::S3LogDir;
487+
use crate::crd::logdir::S3LogDir;
488488

489489
#[test]
490490
pub fn test_env_overrides() {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use stackable_operator::{
1515
};
1616
use strum::{EnumDiscriminants, IntoStaticStr};
1717

18-
use crate::{
18+
use crate::crd::{
1919
constants::*,
2020
history::{
2121
LogFileDirectorySpec::{self, S3},
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
//! This module provides all required CRD definitions and additional helper methods.
22
3-
pub mod affinity;
4-
pub mod constants;
5-
pub mod history;
6-
pub mod logdir;
7-
pub mod roles;
8-
pub mod tlscerts;
9-
103
use std::{
114
cmp::max,
125
collections::{BTreeMap, HashMap},
@@ -52,7 +45,17 @@ use stackable_operator::{
5245
utils::crds::raw_object_list_schema,
5346
};
5447

55-
pub use crate::roles::*;
48+
use crate::crd::roles::{
49+
RoleConfig, RoleConfigFragment, SparkApplicationRole, SparkContainer, SparkMode, SubmitConfig,
50+
SubmitConfigFragment, VolumeMounts,
51+
};
52+
53+
pub mod affinity;
54+
pub mod constants;
55+
pub mod history;
56+
pub mod logdir;
57+
pub mod roles;
58+
pub mod tlscerts;
5659

5760
#[derive(Snafu, Debug)]
5861
pub enum Error {
@@ -1101,10 +1104,7 @@ mod tests {
11011104
};
11021105

11031106
use super::*;
1104-
use crate::{
1105-
cores_from_quantity, resources_to_driver_props, resources_to_executor_props, Quantity,
1106-
RoleConfig, SparkApplication, SparkStorageConfig,
1107-
};
1107+
use crate::crd::roles::SparkStorageConfig;
11081108

11091109
#[test]
11101110
fn test_default_resource_limits() {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use stackable_operator::{
3838
};
3939
use strum::{Display, EnumIter};
4040

41-
use crate::{ResolvedLogDir, SparkApplication};
41+
use crate::crd::{ResolvedLogDir, SparkApplication};
4242

4343
#[derive(Clone, Debug, Deserialize, Display, Eq, PartialEq, Serialize, JsonSchema)]
4444
#[strum(serialize_all = "kebab-case")]

0 commit comments

Comments
 (0)