Skip to content

Commit

Permalink
feat(operator): make configurable replicas (#1255)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag authored Feb 19, 2024
1 parent 60d70ab commit 2c1f49a
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ func CreateOrUpdate(ctx core.Context, stack *v1beta1.Stack, owner interface {
},
}

if deployment.Spec.Replicas == nil {
replicas, err := settings.GetInt32(ctx, stack.Name, "deployment", name, "replicas")
if err != nil {
return err
}

deployment.Spec.Replicas = replicas
}

for ind, container := range deployment.Spec.Template.Spec.InitContainers {
resourceRequirements, err := settings.GetResourceRequirements(ctx, owner.GetStack(),
"deployments", deployment.Name, "init-containers", container.Name, "resource-requirements")
Expand Down

0 comments on commit 2c1f49a

Please sign in to comment.