Skip to content

Commit

Permalink
fix: check usespot before applying replicas (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon authored Jul 29, 2024
1 parent 95d116a commit b7c63c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/generator/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ func composeToServiceValues(
// check if the this service is production and can support 2 replicas on spot
for _, t := range strings.Split(spotReplicaTypes, ",") {
if t != "" {
if t == lagoonType && buildValues.EnvironmentType == "production" {
if t == lagoonType && buildValues.EnvironmentType == "production" && useSpot {
spotReplicas = 2
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ metadata:
lagoon.sh/template: nginx-php-persistent-0.1.0
name: nginx-php
spec:
replicas: 2
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: nginx-php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ metadata:
lagoon.sh/template: nginx-php-persistent-0.1.0
name: nginx-php
spec:
replicas: 2
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: nginx-php
Expand Down

0 comments on commit b7c63c1

Please sign in to comment.