@@ -17,11 +17,13 @@ use stackable_operator::{
1717use strum:: { EnumDiscriminants , IntoStaticStr } ;
1818
1919use crate :: crd:: {
20- DruidRole , PATH_SEGMENT_CACHE , PROP_SEGMENT_CACHE_LOCATIONS ,
20+ DruidRole , PROP_SEGMENT_CACHE_LOCATIONS ,
2121 memory:: { HistoricalDerivedSettings , RESERVED_OS_MEMORY } ,
2222 storage:: { self , default_free_percentage_empty_dir_fragment} ,
2323} ;
2424
25+ const PATH_SEGMENT_CACHE : & str = "/stackable/var/druid/segment-cache" ;
26+
2527// volume names
2628const SEGMENT_CACHE_VOLUME_NAME : & str = "segment-cache" ;
2729
@@ -172,7 +174,7 @@ impl RoleResource {
172174 }
173175}
174176
175- pub static MIDDLE_MANAGER_RESOURCES : LazyLock <
177+ pub ( crate ) static MIDDLE_MANAGER_RESOURCES : LazyLock <
176178 ResourcesFragment < storage:: DruidStorage , NoRuntimeLimits > ,
177179> = LazyLock :: new ( || ResourcesFragment {
178180 cpu : CpuLimitsFragment {
@@ -186,20 +188,21 @@ pub static MIDDLE_MANAGER_RESOURCES: LazyLock<
186188 storage : storage:: DruidStorageFragment { } ,
187189} ) ;
188190
189- pub static BROKER_RESOURCES : LazyLock < ResourcesFragment < storage:: DruidStorage , NoRuntimeLimits > > =
190- LazyLock :: new ( || ResourcesFragment {
191- cpu : CpuLimitsFragment {
192- min : Some ( Quantity ( "300m" . to_owned ( ) ) ) ,
193- max : Some ( Quantity ( "1200m" . to_owned ( ) ) ) ,
194- } ,
195- memory : MemoryLimitsFragment {
196- limit : Some ( Quantity ( "1500Mi" . to_owned ( ) ) ) ,
197- runtime_limits : NoRuntimeLimitsFragment { } ,
198- } ,
199- storage : storage:: DruidStorageFragment { } ,
200- } ) ;
191+ pub ( crate ) static BROKER_RESOURCES : LazyLock <
192+ ResourcesFragment < storage:: DruidStorage , NoRuntimeLimits > ,
193+ > = LazyLock :: new ( || ResourcesFragment {
194+ cpu : CpuLimitsFragment {
195+ min : Some ( Quantity ( "300m" . to_owned ( ) ) ) ,
196+ max : Some ( Quantity ( "1200m" . to_owned ( ) ) ) ,
197+ } ,
198+ memory : MemoryLimitsFragment {
199+ limit : Some ( Quantity ( "1500Mi" . to_owned ( ) ) ) ,
200+ runtime_limits : NoRuntimeLimitsFragment { } ,
201+ } ,
202+ storage : storage:: DruidStorageFragment { } ,
203+ } ) ;
201204
202- pub static HISTORICAL_RESOURCES : LazyLock <
205+ pub ( crate ) static HISTORICAL_RESOURCES : LazyLock <
203206 ResourcesFragment < storage:: HistoricalStorage , NoRuntimeLimits > ,
204207> = LazyLock :: new ( || ResourcesFragment {
205208 cpu : CpuLimitsFragment {
@@ -215,7 +218,7 @@ pub static HISTORICAL_RESOURCES: LazyLock<
215218 } ,
216219} ) ;
217220
218- pub static COORDINATOR_RESOURCES : LazyLock <
221+ pub ( crate ) static COORDINATOR_RESOURCES : LazyLock <
219222 ResourcesFragment < storage:: DruidStorage , NoRuntimeLimits > ,
220223> = LazyLock :: new ( || ResourcesFragment {
221224 cpu : CpuLimitsFragment {
@@ -229,18 +232,19 @@ pub static COORDINATOR_RESOURCES: LazyLock<
229232 storage : storage:: DruidStorageFragment { } ,
230233} ) ;
231234
232- pub static ROUTER_RESOURCES : LazyLock < ResourcesFragment < storage:: DruidStorage , NoRuntimeLimits > > =
233- LazyLock :: new ( || ResourcesFragment {
234- cpu : CpuLimitsFragment {
235- min : Some ( Quantity ( "300m" . to_owned ( ) ) ) ,
236- max : Some ( Quantity ( "1200m" . to_owned ( ) ) ) ,
237- } ,
238- memory : MemoryLimitsFragment {
239- limit : Some ( Quantity ( "512Mi" . to_owned ( ) ) ) ,
240- runtime_limits : NoRuntimeLimitsFragment { } ,
241- } ,
242- storage : storage:: DruidStorageFragment { } ,
243- } ) ;
235+ pub ( crate ) static ROUTER_RESOURCES : LazyLock <
236+ ResourcesFragment < storage:: DruidStorage , NoRuntimeLimits > ,
237+ > = LazyLock :: new ( || ResourcesFragment {
238+ cpu : CpuLimitsFragment {
239+ min : Some ( Quantity ( "300m" . to_owned ( ) ) ) ,
240+ max : Some ( Quantity ( "1200m" . to_owned ( ) ) ) ,
241+ } ,
242+ memory : MemoryLimitsFragment {
243+ limit : Some ( Quantity ( "512Mi" . to_owned ( ) ) ) ,
244+ runtime_limits : NoRuntimeLimitsFragment { } ,
245+ } ,
246+ storage : storage:: DruidStorageFragment { } ,
247+ } ) ;
244248
245249#[ cfg( test) ]
246250mod test {
0 commit comments