File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
orchestratord/src/controller/materialize Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,10 @@ pub mod v1alpha1 {
99
99
pub balancerd_resource_requirements : Option < ResourceRequirements > ,
100
100
// Resource requirements for the console pod
101
101
pub console_resource_requirements : Option < ResourceRequirements > ,
102
+ // Number of balancerd pods to create
103
+ pub balancerd_replicas : Option < i32 > ,
104
+ // Number of console pods to create
105
+ pub console_replicas : Option < i32 > ,
102
106
103
107
// Name of the kubernetes service account to use.
104
108
// If not set, we will create one with the same name as this Materialize object.
@@ -268,6 +272,14 @@ pub mod v1alpha1 {
268
272
self . name_prefixed ( "balancerd-external-tls" )
269
273
}
270
274
275
+ pub fn balancerd_replicas ( & self ) -> i32 {
276
+ self . spec . balancerd_replicas . unwrap_or ( 2 )
277
+ }
278
+
279
+ pub fn console_replicas ( & self ) -> i32 {
280
+ self . spec . console_replicas . unwrap_or ( 2 )
281
+ }
282
+
271
283
pub fn console_configmap_name ( & self ) -> String {
272
284
self . name_prefixed ( "console" )
273
285
}
Original file line number Diff line number Diff line change @@ -320,7 +320,7 @@ fn create_balancerd_deployment_object(
320
320
} ;
321
321
322
322
let deployment_spec = DeploymentSpec {
323
- replicas : Some ( 1 ) ,
323
+ replicas : Some ( mz . balancerd_replicas ( ) ) ,
324
324
selector : LabelSelector {
325
325
match_labels : Some ( pod_template_labels. clone ( ) ) ,
326
326
..Default :: default ( )
Original file line number Diff line number Diff line change @@ -395,7 +395,7 @@ ssl_certificate_key /nginx/tls/tls.key;",
395
395
} ;
396
396
397
397
let deployment_spec = DeploymentSpec {
398
- replicas : Some ( 2 ) ,
398
+ replicas : Some ( mz . console_replicas ( ) ) ,
399
399
selector : LabelSelector {
400
400
match_labels : Some ( pod_template_labels. clone ( ) ) ,
401
401
..Default :: default ( )
You can’t perform that action at this time.
0 commit comments