Skip to content

Commit c955ae6

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/support-sans
2 parents 5cf7c64 + e0309b9 commit c955ae6

File tree

30 files changed

+656
-469
lines changed

30 files changed

+656
-469
lines changed

.github/workflows/pr_pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
env:
99
CARGO_TERM_COLOR: always
10-
RUST_TOOLCHAIN_VERSION: "nightly-2025-01-15"
10+
RUST_TOOLCHAIN_VERSION: "nightly-2025-05-26"
1111

1212
permissions: {}
1313

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ repos:
5656
name: rustfmt
5757
language: system
5858
# Pinning to a specific rustc version, so that we get consistent formatting
59-
entry: cargo +nightly-2025-01-15 fmt --all -- --check
59+
entry: cargo +nightly-2025-05-26 fmt --all -- --check
6060
stages: [pre-commit]
6161
pass_filenames: false

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"rust-analyzer.cargo.features": "all",
33
"rust-analyzer.rustfmt.overrideCommand": [
44
"rustfmt",
5-
"+nightly-2025-01-15",
5+
"+nightly-2025-05-26",
66
"--"
7-
],
7+
]
88
}

Cargo.lock

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

crates/stackable-operator-derive/src/merge.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,13 @@ pub fn derive(input: DeriveInput) -> TokenStream {
6767

6868
let (ty, variants) = match data {
6969
// Structs are almost single-variant enums, so we can reuse most of the same matching code for both cases
70-
Data::Struct(fields) => (InputType::Struct, vec![MergeVariant {
71-
ident: Ident::new("__placeholder", Span::call_site()),
72-
fields,
73-
}]),
70+
Data::Struct(fields) => (
71+
InputType::Struct,
72+
vec![MergeVariant {
73+
ident: Ident::new("__placeholder", Span::call_site()),
74+
fields,
75+
}],
76+
),
7477
Data::Enum(variants) => (InputType::Enum, variants),
7578
};
7679
let merge_variants = variants

crates/stackable-operator/CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
## [0.93.2] - 2025-05-26
8+
9+
### Added
10+
11+
- Added `ListenerClass.spec.loadBalancerClass` and `.loadBalancerAllocateNodePorts` fields ([#986]).
12+
713
### Removed
814

9-
- Remove instrumenation from uninteresting funtions ([#1023]).
15+
- Remove instrumentation from uninteresting functions ([#1023]).
1016

17+
[#986]: https://github.com/stackabletech/operator-rs/pull/986
1118
[#1023]: https://github.com/stackabletech/operator-rs/pull/1023
1219

1320
## [0.93.1] - 2025-05-20

crates/stackable-operator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "stackable-operator"
33
description = "Stackable Operator Framework"
4-
version = "0.93.1"
4+
version = "0.93.2"
55
authors.workspace = true
66
license.workspace = true
77
edition.workspace = true

crates/stackable-operator/src/builder/pdb.rs

Lines changed: 60 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -229,22 +229,28 @@ mod tests {
229229
.with_min_available(42)
230230
.build();
231231

232-
assert_eq!(pdb, PodDisruptionBudget {
233-
metadata: ObjectMeta {
234-
name: Some("trino".to_string()),
235-
namespace: Some("default".to_string()),
236-
..Default::default()
237-
},
238-
spec: Some(PodDisruptionBudgetSpec {
239-
min_available: Some(IntOrString::Int(42)),
240-
selector: Some(LabelSelector {
241-
match_expressions: None,
242-
match_labels: Some(BTreeMap::from([("foo".to_string(), "bar".to_string())])),
232+
assert_eq!(
233+
pdb,
234+
PodDisruptionBudget {
235+
metadata: ObjectMeta {
236+
name: Some("trino".to_string()),
237+
namespace: Some("default".to_string()),
238+
..Default::default()
239+
},
240+
spec: Some(PodDisruptionBudgetSpec {
241+
min_available: Some(IntOrString::Int(42)),
242+
selector: Some(LabelSelector {
243+
match_expressions: None,
244+
match_labels: Some(BTreeMap::from([(
245+
"foo".to_string(),
246+
"bar".to_string()
247+
)])),
248+
}),
249+
..Default::default()
243250
}),
244251
..Default::default()
245-
}),
246-
..Default::default()
247-
})
252+
}
253+
)
248254
}
249255

250256
#[test]
@@ -283,54 +289,57 @@ mod tests {
283289
.with_max_unavailable(2)
284290
.build();
285291

286-
assert_eq!(pdb, PodDisruptionBudget {
287-
metadata: ObjectMeta {
288-
name: Some("simple-trino-worker".to_string()),
289-
namespace: Some("default".to_string()),
290-
labels: Some(BTreeMap::from([
291-
("app.kubernetes.io/name".to_string(), "trino".to_string()),
292-
(
293-
"app.kubernetes.io/instance".to_string(),
294-
"simple-trino".to_string()
295-
),
296-
(
297-
"app.kubernetes.io/managed-by".to_string(),
298-
"trino.stackable.tech_trino-operator-trino-controller".to_string()
299-
),
300-
(
301-
"app.kubernetes.io/component".to_string(),
302-
"worker".to_string()
303-
)
304-
])),
305-
owner_references: Some(vec![
306-
OwnerReferenceBuilder::new()
307-
.initialize_from_resource(&trino)
308-
.block_owner_deletion_opt(None)
309-
.controller_opt(Some(true))
310-
.build()
311-
.unwrap()
312-
]),
313-
..Default::default()
314-
},
315-
spec: Some(PodDisruptionBudgetSpec {
316-
max_unavailable: Some(IntOrString::Int(2)),
317-
selector: Some(LabelSelector {
318-
match_expressions: None,
319-
match_labels: Some(BTreeMap::from([
292+
assert_eq!(
293+
pdb,
294+
PodDisruptionBudget {
295+
metadata: ObjectMeta {
296+
name: Some("simple-trino-worker".to_string()),
297+
namespace: Some("default".to_string()),
298+
labels: Some(BTreeMap::from([
320299
("app.kubernetes.io/name".to_string(), "trino".to_string()),
321300
(
322301
"app.kubernetes.io/instance".to_string(),
323302
"simple-trino".to_string()
324303
),
304+
(
305+
"app.kubernetes.io/managed-by".to_string(),
306+
"trino.stackable.tech_trino-operator-trino-controller".to_string()
307+
),
325308
(
326309
"app.kubernetes.io/component".to_string(),
327310
"worker".to_string()
328311
)
329312
])),
313+
owner_references: Some(vec![
314+
OwnerReferenceBuilder::new()
315+
.initialize_from_resource(&trino)
316+
.block_owner_deletion_opt(None)
317+
.controller_opt(Some(true))
318+
.build()
319+
.unwrap()
320+
]),
321+
..Default::default()
322+
},
323+
spec: Some(PodDisruptionBudgetSpec {
324+
max_unavailable: Some(IntOrString::Int(2)),
325+
selector: Some(LabelSelector {
326+
match_expressions: None,
327+
match_labels: Some(BTreeMap::from([
328+
("app.kubernetes.io/name".to_string(), "trino".to_string()),
329+
(
330+
"app.kubernetes.io/instance".to_string(),
331+
"simple-trino".to_string()
332+
),
333+
(
334+
"app.kubernetes.io/component".to_string(),
335+
"worker".to_string()
336+
)
337+
])),
338+
}),
339+
..Default::default()
330340
}),
331341
..Default::default()
332-
}),
333-
..Default::default()
334-
})
342+
}
343+
)
335344
}
336345
}

crates/stackable-operator/src/builder/pod/container.rs

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,16 @@ impl ContainerBuilder {
120120
name: impl Into<String>,
121121
field_path: FieldPathEnvVar,
122122
) -> &mut Self {
123-
self.add_env_var_from_source(name, EnvVarSource {
124-
field_ref: Some(ObjectFieldSelector {
125-
field_path: field_path.to_string(),
126-
..ObjectFieldSelector::default()
127-
}),
128-
..EnvVarSource::default()
129-
});
123+
self.add_env_var_from_source(
124+
name,
125+
EnvVarSource {
126+
field_ref: Some(ObjectFieldSelector {
127+
field_path: field_path.to_string(),
128+
..ObjectFieldSelector::default()
129+
}),
130+
..EnvVarSource::default()
131+
},
132+
);
130133
self
131134
}
132135

@@ -137,14 +140,17 @@ impl ContainerBuilder {
137140
secret_name: impl Into<String>,
138141
secret_key: impl Into<String>,
139142
) -> &mut Self {
140-
self.add_env_var_from_source(name, EnvVarSource {
141-
secret_key_ref: Some(SecretKeySelector {
142-
name: secret_name.into(),
143-
key: secret_key.into(),
143+
self.add_env_var_from_source(
144+
name,
145+
EnvVarSource {
146+
secret_key_ref: Some(SecretKeySelector {
147+
name: secret_name.into(),
148+
key: secret_key.into(),
149+
..Default::default()
150+
}),
144151
..Default::default()
145-
}),
146-
..Default::default()
147-
});
152+
},
153+
);
148154
self
149155
}
150156

@@ -155,14 +161,17 @@ impl ContainerBuilder {
155161
config_map_name: impl Into<String>,
156162
config_map_key: impl Into<String>,
157163
) -> &mut Self {
158-
self.add_env_var_from_source(name, EnvVarSource {
159-
config_map_key_ref: Some(ConfigMapKeySelector {
160-
name: config_map_name.into(),
161-
key: config_map_key.into(),
164+
self.add_env_var_from_source(
165+
name,
166+
EnvVarSource {
167+
config_map_key_ref: Some(ConfigMapKeySelector {
168+
name: config_map_name.into(),
169+
key: config_map_key.into(),
170+
..Default::default()
171+
}),
162172
..Default::default()
163-
}),
164-
..Default::default()
165-
});
173+
},
174+
);
166175
self
167176
}
168177

crates/stackable-operator/src/builder/pod/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -767,11 +767,12 @@ mod tests {
767767
.build()
768768
.unwrap();
769769

770-
assert_eq!(pod.spec.unwrap().image_pull_secrets.unwrap(), vec![
771-
LocalObjectReference {
770+
assert_eq!(
771+
pod.spec.unwrap().image_pull_secrets.unwrap(),
772+
vec![LocalObjectReference {
772773
name: "company-registry-secret".to_string()
773-
}
774-
]);
774+
}]
775+
);
775776
}
776777

777778
#[rstest]

0 commit comments

Comments
 (0)