Skip to content

Commit 96f89e9

Browse files
committed
Use constant
1 parent bcfa653 commit 96f89e9

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

Cargo.lock

Lines changed: 7 additions & 7 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
@@ -32,7 +32,7 @@ tokio-zookeeper = "0.4"
3232
tracing = "0.1"
3333

3434
[patch."https://github.com/stackabletech/operator-rs"]
35-
# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }
35+
stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "feat/restarter-label" }
3636
# stackable-operator = { path = "../operator-rs/crates/stackable-operator" }
3737

3838
[patch.crates-io]

rust/operator-binary/src/zk_controller.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ use stackable_operator::{
3333
product_image_selection::{self, ResolvedProductImage},
3434
rbac::build_rbac_resources,
3535
},
36+
constants::RESTART_CONTROLLER_ENABLED_LABEL,
3637
k8s_openapi::{
3738
DeepMerge,
3839
api::{
@@ -51,7 +52,7 @@ use stackable_operator::{
5152
core::{DeserializeGuard, error_boundary},
5253
runtime::controller,
5354
},
54-
kvp::{Label, LabelError, Labels},
55+
kvp::{LabelError, Labels},
5556
logging::controller::ReconcilerError,
5657
product_config_utils::{transform_all_roles_to_config, validate_all_roles_and_groups_config},
5758
product_logging::{
@@ -1023,10 +1024,7 @@ fn build_server_rolegroup_statefulset(
10231024
&rolegroup_ref.role_group,
10241025
))
10251026
.context(ObjectMetaSnafu)?
1026-
.with_label(
1027-
Label::try_from(("restarter.stackable.tech/enabled", "true"))
1028-
.expect("static label is always valid"),
1029-
)
1027+
.with_label(RESTART_CONTROLLER_ENABLED_LABEL.to_owned())
10301028
.build();
10311029

10321030
let statefulset_match_labels =

0 commit comments

Comments
 (0)