Skip to content

Commit

Permalink
Fixed liveness/readiness probe (Disabled when port=0).
Browse files Browse the repository at this point in the history
  • Loading branch information
BSick7 committed Mar 22, 2024
1 parent 9f63293 commit 5f64016
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.6.8 (Mar 22, 2024)
* Fixed liveness/readiness probe (Disabled when `port=0`).

# 0.6.7 (Mar 22, 2024)
* Fix lockfile.

Expand Down
41 changes: 24 additions & 17 deletions deployment.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,35 @@ resource "kubernetes_deployment_v1" "this" {
}
}

liveness_probe {
failure_threshold = 3
success_threshold = 1
initial_delay_seconds = var.readiness_delay
period_seconds = 10
timeout_seconds = 1
dynamic "liveness_probe" {
for_each = local.has_service ? [1] : []


tcp_socket {
port = var.port
content {
failure_threshold = 3
success_threshold = 1
initial_delay_seconds = var.readiness_delay
period_seconds = 10
timeout_seconds = 1

tcp_socket {
port = var.port
}
}
}

readiness_probe {
failure_threshold = 3
success_threshold = 1
initial_delay_seconds = var.readiness_delay
period_seconds = 10
timeout_seconds = 1
dynamic "readiness_probe" {
for_each = local.has_service ? [1] : []

tcp_socket {
port = var.port
content {
failure_threshold = 3
success_threshold = 1
initial_delay_seconds = var.readiness_delay
period_seconds = 10
timeout_seconds = 1

tcp_socket {
port = var.port
}
}
}

Expand Down

0 comments on commit 5f64016

Please sign in to comment.