Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use updated product-config #408

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 173 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
snafu = "0.7"
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.52.1" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.56.0" }
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.6.0" }
strum = { version = "0.25", features = ["derive"] }
tokio = { version = "1.29", features = ["full"] }
tracing = "0.1"
Expand Down
8 changes: 5 additions & 3 deletions rust/crd/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pub mod affinity;
use std::{collections::BTreeMap, str::FromStr};

use affinity::get_affinity;
use serde::{Deserialize, Serialize};
use snafu::{OptionExt, ResultExt, Snafu};
use stackable_operator::{
Expand All @@ -22,9 +21,12 @@ use stackable_operator::{
schemars::{self, JsonSchema},
status::condition::{ClusterCondition, HasStatusCondition},
};
use std::{collections::BTreeMap, str::FromStr};
use strum::{Display, EnumIter, EnumString};

use crate::affinity::get_affinity;

pub mod affinity;

pub const APP_NAME: &str = "hbase";

pub const CONFIG_DIR_NAME: &str = "/stackable/conf";
Expand Down
1 change: 1 addition & 0 deletions rust/operator-binary/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ futures.workspace = true
serde.workspace = true
snafu.workspace = true
stackable-operator.workspace = true
product-config.workspace = true
strum.workspace = true
tokio.workspace = true
tracing.workspace = true
Expand Down
10 changes: 6 additions & 4 deletions rust/operator-binary/src/discovery.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use std::collections::BTreeMap;

use crate::{
hbase_controller::build_recommended_labels, zookeeper::ZookeeperConnectionInformation,
};
use product_config::writer::to_hadoop_xml;
use stackable_hbase_crd::{HbaseCluster, HbaseRole, HBASE_SITE_XML};
use stackable_operator::{
builder::{ConfigMapBuilder, ObjectMetaBuilder},
Expand All @@ -11,6 +9,10 @@ use stackable_operator::{
k8s_openapi::api::core::v1::ConfigMap,
};

use crate::{
hbase_controller::build_recommended_labels, zookeeper::ZookeeperConnectionInformation,
};

/// Creates a discovery config map containing the `hbase-site.xml` for clients.
pub fn build_discovery_configmap(
hbase: &HbaseCluster,
Expand All @@ -34,7 +36,7 @@ pub fn build_discovery_configmap(
)
.add_data(
HBASE_SITE_XML,
stackable_operator::product_config::writer::to_hadoop_xml(
to_hadoop_xml(
hbase_site
.into_iter()
.map(|(k, v)| (k, Some(v)))
Expand Down
Loading
Loading