diff --git a/internal/controller/install/armadaserver_controller.go b/internal/controller/install/armadaserver_controller.go index a94b0b6..8138454 100644 --- a/internal/controller/install/armadaserver_controller.go +++ b/internal/controller/install/armadaserver_controller.go @@ -438,7 +438,6 @@ func createArmadaServerDeployment( serviceAccountName string, commonConfig *builders.CommonApplicationConfig, ) (*appsv1.Deployment, error) { - var replicas int32 = 1 env := createEnv(as.Spec.Environment) pulsarConfig, err := ExtractPulsarConfig(as.Spec.ApplicationConfig) if err != nil { @@ -458,7 +457,7 @@ func createArmadaServerDeployment( Labels: AllLabels(as.Name, as.Labels), }, Spec: appsv1.DeploymentSpec{ - Replicas: &replicas, + Replicas: as.Spec.Replicas, Selector: &metav1.LabelSelector{ MatchLabels: IdentityLabel(as.Name), }, diff --git a/internal/controller/install/armadaserver_controller_test.go b/internal/controller/install/armadaserver_controller_test.go index bd0319c..cc24125 100644 --- a/internal/controller/install/armadaserver_controller_test.go +++ b/internal/controller/install/armadaserver_controller_test.go @@ -501,6 +501,7 @@ func TestArmadaServerReconciler_CreateDeployment(t *testing.T) { Labels: map[string]string{"test": "hello"}, Annotations: map[string]string{"test": "hello"}, }, + Replicas: ptr.To[int32](2), }, } @@ -517,7 +518,7 @@ func TestArmadaServerReconciler_CreateDeployment(t *testing.T) { }, }, Spec: appsv1.DeploymentSpec{ - Replicas: ptr.To[int32](1), + Replicas: ptr.To[int32](2), Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "app": "armadaserver",