File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,16 @@ All notable changes to this project will be documented in this file.
16
16
- Let secret-operator handle certificate conversion ([ #392 ] ).
17
17
- ` operator-rs ` ` 0.44.0 ` -> ` 0.52.0 ` ([ #381 ] , [ #394 ] , [ #404 ] ).
18
18
19
+ ### Fixed
20
+
21
+ - Don't default roleGroup replicas to zero when not specified ([ #402 ] ).
22
+
19
23
[ #378 ] : https://github.com/stackabletech/hdfs-operator/pull/378
20
24
[ #381 ] : https://github.com/stackabletech/hdfs-operator/pull/381
21
25
[ #384 ] : https://github.com/stackabletech/hdfs-operator/pull/384
22
26
[ #392 ] : https://github.com/stackabletech/hdfs-operator/pull/392
23
27
[ #394 ] : https://github.com/stackabletech/hdfs-operator/pull/394
28
+ [ #402 ] : https://github.com/stackabletech/hdfs-operator/pull/402
24
29
[ #404 ] : https://github.com/stackabletech/hdfs-operator/pull/404
25
30
26
31
## [ 23.7.0] - 2023-07-14
Original file line number Diff line number Diff line change @@ -377,23 +377,17 @@ impl HdfsRole {
377
377
}
378
378
379
379
/// Return replicas for a certain rolegroup.
380
- pub fn role_group_replicas ( & self , hdfs : & HdfsCluster , role_group : & str ) -> i32 {
380
+ pub fn role_group_replicas ( & self , hdfs : & HdfsCluster , role_group : & str ) -> Option < u16 > {
381
381
match self {
382
382
HdfsRole :: NameNode => hdfs
383
383
. namenode_rolegroup ( role_group)
384
- . and_then ( |rg| rg. replicas )
385
- . unwrap_or_default ( )
386
- . into ( ) ,
384
+ . and_then ( |rg| rg. replicas ) ,
387
385
HdfsRole :: DataNode => hdfs
388
386
. datanode_rolegroup ( role_group)
389
- . and_then ( |rg| rg. replicas )
390
- . unwrap_or_default ( )
391
- . into ( ) ,
387
+ . and_then ( |rg| rg. replicas ) ,
392
388
HdfsRole :: JournalNode => hdfs
393
389
. journalnode_rolegroup ( role_group)
394
- . and_then ( |rg| rg. replicas )
395
- . unwrap_or_default ( )
396
- . into ( ) ,
390
+ . and_then ( |rg| rg. replicas ) ,
397
391
}
398
392
}
399
393
Original file line number Diff line number Diff line change @@ -694,7 +694,9 @@ fn rolegroup_statefulset(
694
694
. build ( ) ,
695
695
spec : Some ( StatefulSetSpec {
696
696
pod_management_policy : Some ( "OrderedReady" . to_string ( ) ) ,
697
- replicas : Some ( role. role_group_replicas ( hdfs, & rolegroup_ref. role_group ) ) ,
697
+ replicas : role
698
+ . role_group_replicas ( hdfs, & rolegroup_ref. role_group )
699
+ . map ( i32:: from) ,
698
700
selector : LabelSelector {
699
701
match_labels : Some ( role_group_selector_labels (
700
702
hdfs,
You can’t perform that action at this time.
0 commit comments