Skip to content

Commit 06c9f7e

Browse files
committed
added missed role/From instance
1 parent f5b2e16 commit 06c9f7e

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

  • rust/operator-binary/src/controller/build/resource

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
use std::{
2-
cmp::{max, min},
3-
str::FromStr,
4-
};
1+
use std::cmp::{max, min};
52

63
use stackable_operator::{
74
k8s_openapi::api::policy::v1::PodDisruptionBudget,
@@ -28,8 +25,7 @@ pub fn build_pdb(cluster: &ValidatedCluster, role: &HdfsNodeRole) -> Option<PodD
2825
),
2926
HdfsNodeRole::Journal => max_unavailable_journal_nodes(),
3027
});
31-
let role_name =
32-
RoleName::from_str(&role.to_string()).expect("a HdfsNodeRole is a valid role name");
28+
let role_name: RoleName = role.into();
3329
let pdb = pod_disruption_budget_builder_with_role(
3430
cluster,
3531
&product_name(),

0 commit comments

Comments
 (0)