Skip to content

Commit ba24940

Browse files
committed
chore: migrate crd crate to operator-binary module
1 parent 574b0ad commit ba24940

File tree

16 files changed

+26
-111
lines changed

16 files changed

+26
-111
lines changed

Cargo.lock

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

Cargo.nix

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

rust/crd/Cargo.toml

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

rust/operator-binary/Cargo.toml

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

1111
[dependencies]
12-
stackable-opa-crd = { path = "../crd" }
13-
1412
anyhow.workspace = true
1513
clap.workspace = true
14+
derivative.workspace = true
1615
fnv.workspace = true
1716
futures.workspace = true
1817
indoc.workspace = true

rust/operator-binary/src/controller.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use product_config::{types::PropertyNameKind, ProductConfigManager};
99
use serde::{Deserialize, Serialize};
1010
use serde_json::json;
1111
use snafu::{OptionExt, ResultExt, Snafu};
12-
use stackable_opa_crd::{
12+
use stackable_opa_operator::crd::{
1313
user_info_fetcher, Container, OpaCluster, OpaClusterStatus, OpaConfig, OpaRole, APP_NAME,
1414
DEFAULT_SERVER_GRACEFUL_SHUTDOWN_TIMEOUT, OPERATOR_NAME,
1515
};
@@ -160,7 +160,9 @@ pub enum Error {
160160
NoName,
161161

162162
#[snafu(display("internal operator failure"))]
163-
InternalOperatorFailure { source: stackable_opa_crd::Error },
163+
InternalOperatorFailure {
164+
source: stackable_opa_operator::crd::Error,
165+
},
164166

165167
#[snafu(display("failed to calculate role service name"))]
166168
RoleServiceNameNotFound,
@@ -239,7 +241,9 @@ pub enum Error {
239241
},
240242

241243
#[snafu(display("failed to resolve and merge config for role and role group"))]
242-
FailedToResolveConfig { source: stackable_opa_crd::Error },
244+
FailedToResolveConfig {
245+
source: stackable_opa_operator::crd::Error,
246+
},
243247

244248
#[snafu(display("illegal container name"))]
245249
IllegalContainerName {
File renamed without changes.

rust/operator-binary/src/discovery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::controller::{build_recommended_labels, APP_PORT};
22

33
use snafu::{OptionExt, ResultExt, Snafu};
4-
use stackable_opa_crd::{OpaCluster, OpaRole};
4+
use stackable_opa_operator::crd::{OpaCluster, OpaRole};
55
use stackable_operator::{
66
builder::{configmap::ConfigMapBuilder, meta::ObjectMetaBuilder},
77
commons::product_image_selection::ResolvedProductImage,

rust/operator-binary/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod crd;

rust/operator-binary/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::sync::Arc;
33
use clap::{crate_description, crate_version, Parser};
44
use futures::StreamExt;
55
use product_config::ProductConfigManager;
6-
use stackable_opa_crd::{OpaCluster, APP_NAME, OPERATOR_NAME};
6+
use stackable_opa_operator::crd::{OpaCluster, APP_NAME, OPERATOR_NAME};
77
use stackable_operator::{
88
cli::{Command, ProductOperatorRun},
99
client::{self, Client},

0 commit comments

Comments
 (0)