Refactor squid configuration to include readiness and liveness probes, resource requests, and security context

This commit is contained in:
2024-09-26 12:03:33 +02:00
parent 605b3dd912
commit 6cb291a9ea
2 changed files with 32 additions and 1 deletions
+28
View File
@@ -210,6 +210,34 @@ resource "kubernetes_deployment" "proxy_pt" {
protocol = "TCP" protocol = "TCP"
} }
readiness_probe {
tcp_socket {
port = "proxy"
}
initial_delay_seconds = 10
timeout_seconds = 4
}
liveness_probe {
tcp_socket {
port = "proxy"
}
initial_delay_seconds = 10
timeout_seconds = 4
}
resources {
requests = {
memory = "256Mi"
}
}
security_context {
allow_privilege_escalation = false
run_as_user = 1000
run_as_group = 1000
}
volume_mount { volume_mount {
name = "squid-config" name = "squid-config"
mount_path = "/etc/squid" mount_path = "/etc/squid"
@@ -43,3 +43,6 @@ follow_x_forwarded_for deny all
pipeline_prefetch on pipeline_prefetch on
request_header_access From deny all request_header_access From deny all
request_header_access Server deny all request_header_access Server deny all
pid_filename none
access_log stdio:/dev/stdout
cache_log stdio:/dev/stderr