From be22d97ab9df5c5c86d6d44b05ee343fa95d1cf8 Mon Sep 17 00:00:00 2001 From: Vojtech Mares Date: Sun, 30 Jun 2024 22:06:44 +0200 Subject: [PATCH] feat(loadbalancer): use http for health checking, ping /healthz ingress-nginx endpoint --- loadbalancer.tf | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/loadbalancer.tf b/loadbalancer.tf index a55801f..d6be46a 100644 --- a/loadbalancer.tf +++ b/loadbalancer.tf @@ -24,6 +24,18 @@ resource "hcloud_load_balancer_service" "ingress_workers_tcp_80" { listen_port = 80 destination_port = 32080 proxyprotocol = true + + health_check { + protocol = "http" + port = 32080 + interval = 5 + timeout = 3 + retries = 1 + + http { + path = "/healthz" + } + } } resource "hcloud_load_balancer_service" "ingress_workers_tcp_443" { @@ -32,6 +44,18 @@ resource "hcloud_load_balancer_service" "ingress_workers_tcp_443" { listen_port = 443 destination_port = 32443 proxyprotocol = true + + health_check { + protocol = "http" + port = 32080 + interval = 5 + timeout = 3 + retries = 1 + + http { + path = "/healthz" + } + } } resource "cloudflare_record" "ingress_cthulhu_k8s_vxm_cz" {