Skip to content

Commit

Permalink
Set armada server replicas from spec
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Parraga <[email protected]>
  • Loading branch information
Sovietaced committed Dec 4, 2024
1 parent 122dba3 commit e735454
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions internal/controller/install/armadaserver_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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),
},
Expand Down
3 changes: 2 additions & 1 deletion internal/controller/install/armadaserver_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
}

Expand All @@ -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",
Expand Down

0 comments on commit e735454

Please sign in to comment.