[ci skip] Use RollingUpdate strategy for real-estate-crawler deployments
Set max_unavailable=0, max_surge=1 on both UI and API deployments to ensure at least 1 replica is always available during updates.
This commit is contained in:
parent
348d706a48
commit
f9c07f015b
2 changed files with 12 additions and 4 deletions
|
|
@ -33,9 +33,13 @@ resource "kubernetes_deployment" "realestate-crawler-ui" {
|
|||
}
|
||||
spec {
|
||||
replicas = 1
|
||||
# strategy {
|
||||
# type = "RollingUpdate" # DB is external so we can roll
|
||||
# }
|
||||
strategy {
|
||||
type = "RollingUpdate"
|
||||
rolling_update {
|
||||
max_unavailable = 0
|
||||
max_surge = 1
|
||||
}
|
||||
}
|
||||
selector {
|
||||
match_labels = {
|
||||
app = "realestate-crawler-ui"
|
||||
|
|
@ -102,7 +106,11 @@ resource "kubernetes_deployment" "realestate-crawler-api" {
|
|||
spec {
|
||||
replicas = 1
|
||||
strategy {
|
||||
type = "Recreate"
|
||||
type = "RollingUpdate"
|
||||
rolling_update {
|
||||
max_unavailable = 0
|
||||
max_surge = 1
|
||||
}
|
||||
}
|
||||
selector {
|
||||
match_labels = {
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue