Skip to content

Commit e413e2b

Browse files
chore: Upgrade dependencies (#37)
* chore: Upgrade all dependencies * chore: Upgrade to stackable-operator 0.98.0 * test: Adapt a unit test name * chore: Regenerate charts * chore: Remove file generated by the merge with main * chore: Regenerate charts * chore: Reformat code
1 parent e1b1563 commit e413e2b

File tree

17 files changed

+2453
-1875
lines changed

17 files changed

+2453
-1875
lines changed

Cargo.lock

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

Cargo.nix

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

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ edition = "2024"
1010
repository = "https://github.com/stackabletech/opensearch-operator"
1111

1212
[workspace.dependencies]
13-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.93.2" }
13+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.98.0" }
1414

1515
built = { version = "0.8.0", features = ["chrono", "git2"] }
1616
clap = "4.5"
1717
futures = { version = "0.3", features = ["compat"] }
1818
rstest = "0.26"
19-
schemars = { version = "0.8.21" } # same as in operator-rs
19+
schemars = { version = "1.0.0", features = ["url2"] } # same as in operator-rs
2020
serde = { version = "1.0", features = ["derive"] }
2121
serde_json = "1.0"
2222
snafu = "0.8"
2323
strum = { version = "0.27", features = ["derive"] }
24-
tokio = { version = "1.45", features = ["full"] }
24+
tokio = { version = "1.47", features = ["full"] }
2525
tracing = "0.1"
2626
uuid = "1.18"
2727

crate-hashes.json

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

deploy/helm/opensearch-operator/crds/crds.yaml

Lines changed: 153 additions & 39 deletions
Large diffs are not rendered by default.

deploy/helm/opensearch-operator/templates/roles.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ rules:
1212
verbs:
1313
- list
1414
- watch
15+
# For automatic cluster domain detection
16+
- apiGroups:
17+
- ""
18+
resources:
19+
- nodes/proxy
20+
verbs:
21+
- get
1522
- apiGroups:
1623
- ""
1724
resources:

rust/operator-binary/src/controller.rs

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use build::build;
1010
use snafu::{ResultExt, Snafu};
1111
use stackable_operator::{
1212
cluster_resources::ClusterResourceApplyStrategy,
13-
commons::{affinity::StackableAffinity, product_image_selection::ProductImage},
13+
commons::{affinity::StackableAffinity, product_image_selection::ResolvedProductImage},
1414
crd::listener::v1alpha1::Listener,
1515
k8s_openapi::api::{
1616
apps::v1::StatefulSet,
@@ -21,7 +21,7 @@ use stackable_operator::{
2121
kube::{Resource, api::ObjectMeta, core::DeserializeGuard, runtime::controller::Action},
2222
logging::controller::ReconcilerError,
2323
role_utils::GenericRoleConfig,
24-
time::Duration,
24+
shared::time::Duration,
2525
};
2626
use strum::{EnumDiscriminants, IntoStaticStr};
2727
use update_status::update_status;
@@ -144,7 +144,7 @@ pub struct ValidatedOpenSearchConfig {
144144
#[derive(Clone, Debug, PartialEq)]
145145
pub struct ValidatedCluster {
146146
metadata: ObjectMeta,
147-
pub image: ProductImage,
147+
pub image: ResolvedProductImage,
148148
pub product_version: ProductVersion,
149149
pub name: ClusterName,
150150
pub namespace: NamespaceName,
@@ -155,7 +155,7 @@ pub struct ValidatedCluster {
155155

156156
impl ValidatedCluster {
157157
pub fn new(
158-
image: ProductImage,
158+
image: ResolvedProductImage,
159159
product_version: ProductVersion,
160160
name: ClusterName,
161161
namespace: NamespaceName,
@@ -346,10 +346,15 @@ struct KubernetesResources<T> {
346346

347347
#[cfg(test)]
348348
mod tests {
349-
use std::collections::{BTreeMap, HashMap};
349+
use std::{
350+
collections::{BTreeMap, HashMap},
351+
str::FromStr,
352+
};
350353

351354
use stackable_operator::{
352-
commons::affinity::StackableAffinity, k8s_openapi::api::core::v1::PodTemplateSpec,
355+
commons::{affinity::StackableAffinity, product_image_selection::ResolvedProductImage},
356+
k8s_openapi::api::core::v1::PodTemplateSpec,
357+
kvp::LabelValue,
353358
role_utils::GenericRoleConfig,
354359
};
355360
use uuid::uuid;
@@ -425,8 +430,14 @@ mod tests {
425430

426431
fn validated_cluster() -> ValidatedCluster {
427432
ValidatedCluster::new(
428-
serde_json::from_str(r#"{"productVersion": "3.1.0"}"#)
429-
.expect("should be a valid ProductImage structure"),
433+
ResolvedProductImage {
434+
product_version: "3.1.0".to_owned(),
435+
app_version_label_value: LabelValue::from_str("3.1.0-stackable0.0.0-dev")
436+
.expect("should be a valid label value"),
437+
image: "oci.stackable.tech/sdp/opensearch:3.1.0-stackable0.0.0-dev".to_string(),
438+
image_pull_policy: "Always".to_owned(),
439+
pull_secrets: None,
440+
},
430441
ProductVersion::from_str_unsafe("3.1.0"),
431442
ClusterName::from_str_unsafe("my-opensearch"),
432443
NamespaceName::from_str_unsafe("default"),

rust/operator-binary/src/controller/build.rs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,17 @@ pub fn build(names: &ContextNames, cluster: ValidatedCluster) -> KubernetesResou
5555

5656
#[cfg(test)]
5757
mod tests {
58-
use std::collections::{BTreeMap, HashMap};
58+
use std::{
59+
collections::{BTreeMap, HashMap},
60+
str::FromStr,
61+
};
5962

6063
use stackable_operator::{
61-
commons::affinity::StackableAffinity, k8s_openapi::api::core::v1::PodTemplateSpec,
62-
kube::Resource, role_utils::GenericRoleConfig,
64+
commons::{affinity::StackableAffinity, product_image_selection::ResolvedProductImage},
65+
k8s_openapi::api::core::v1::PodTemplateSpec,
66+
kube::Resource,
67+
kvp::LabelValue,
68+
role_utils::GenericRoleConfig,
6369
};
6470
use uuid::uuid;
6571

@@ -148,8 +154,14 @@ mod tests {
148154

149155
fn validated_cluster() -> ValidatedCluster {
150156
ValidatedCluster::new(
151-
serde_json::from_str(r#"{"productVersion": "3.1.0"}"#)
152-
.expect("should be a valid ProductImage structure"),
157+
ResolvedProductImage {
158+
product_version: "3.1.0".to_owned(),
159+
app_version_label_value: LabelValue::from_str("3.1.0-stackable0.0.0-dev")
160+
.expect("should be a valid label value"),
161+
image: "oci.stackable.tech/sdp/opensearch:3.1.0-stackable0.0.0-dev".to_string(),
162+
image_pull_policy: "Always".to_owned(),
163+
pull_secrets: None,
164+
},
153165
ProductVersion::from_str_unsafe("3.1.0"),
154166
ClusterName::from_str_unsafe("my-opensearch"),
155167
NamespaceName::from_str_unsafe("default"),

rust/operator-binary/src/controller/build/node_config.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,12 @@ mod tests {
269269

270270
use stackable_operator::{
271271
commons::{
272-
affinity::StackableAffinity, product_image_selection::ProductImage,
272+
affinity::StackableAffinity,
273+
product_image_selection::{ProductImage, ResolvedProductImage},
273274
resources::Resources,
274275
},
275276
k8s_openapi::api::core::v1::PodTemplateSpec,
277+
kvp::LabelValue,
276278
role_utils::GenericRoleConfig,
277279
};
278280
use uuid::uuid;
@@ -328,7 +330,14 @@ mod tests {
328330
};
329331

330332
let cluster = ValidatedCluster::new(
331-
image.clone(),
333+
ResolvedProductImage {
334+
product_version: "3.1.0".to_owned(),
335+
app_version_label_value: LabelValue::from_str("3.1.0-stackable0.0.0-dev")
336+
.expect("should be a valid label value"),
337+
image: "oci.stackable.tech/sdp/opensearch:3.1.0-stackable0.0.0-dev".to_string(),
338+
image_pull_policy: "Always".to_owned(),
339+
pull_secrets: None,
340+
},
332341
ProductVersion::from_str_unsafe(image.product_version()),
333342
ClusterName::from_str_unsafe("my-opensearch-cluster"),
334343
NamespaceName::from_str_unsafe("default"),

rust/operator-binary/src/controller/build/role_builder.rs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,20 @@ impl<'a> RoleBuilder<'a> {
213213

214214
#[cfg(test)]
215215
mod tests {
216-
use std::collections::{BTreeMap, HashMap};
216+
use std::{
217+
collections::{BTreeMap, HashMap},
218+
str::FromStr,
219+
};
217220

218221
use serde_json::json;
219222
use stackable_operator::{
220223
commons::{
221-
affinity::StackableAffinity, product_image_selection::ProductImage,
224+
affinity::StackableAffinity,
225+
product_image_selection::{ProductImage, ResolvedProductImage},
222226
resources::Resources,
223227
},
224228
k8s_openapi::api::core::v1::PodTemplateSpec,
229+
kvp::LabelValue,
225230
role_utils::GenericRoleConfig,
226231
};
227232
use uuid::uuid;
@@ -273,7 +278,14 @@ mod tests {
273278
};
274279

275280
let cluster = ValidatedCluster::new(
276-
image.clone(),
281+
ResolvedProductImage {
282+
product_version: "3.1.0".to_owned(),
283+
app_version_label_value: LabelValue::from_str("3.1.0-stackable0.0.0-dev")
284+
.expect("should be a valid label value"),
285+
image: "oci.stackable.tech/sdp/opensearch:3.1.0-stackable0.0.0-dev".to_string(),
286+
image_pull_policy: "Always".to_owned(),
287+
pull_secrets: None,
288+
},
277289
ProductVersion::from_str_unsafe(image.product_version()),
278290
ClusterName::from_str_unsafe("my-opensearch-cluster"),
279291
NamespaceName::from_str_unsafe("default"),

0 commit comments

Comments
 (0)