Commit 42fc6ef9 by chenxx

update

1 parent 1551f562
...@@ -31,6 +31,32 @@ module "deployment" { ...@@ -31,6 +31,32 @@ module "deployment" {
limit_memory = var.limit_memory == "" ? null : var.limit_memory limit_memory = var.limit_memory == "" ? null : var.limit_memory
} }
env = var.env env = var.env
readiness_probe = {
http_get = {
path = "/"
port = var.probe_http_port
scheme = "HTTP"
}
success_threshold = 1
failure_threshold = 3
initial_delay_seconds = 10
period_seconds = 30
timeout_seconds = 3
}
volume_host_path = [
{
volume_name = var.volume_logs
path_on_node = "/data/java_log"
},
{
volume_name = var.app_path
path_on_node = "/app/soft/java_project"
}
]
} }
module "service" { module "service" {
...@@ -42,13 +68,16 @@ module "service" { ...@@ -42,13 +68,16 @@ module "service" {
app_name = local.name app_name = local.name
app_namespace = local.namespace app_namespace = local.namespace
type = "NodePort" type = "NodePort"
port_mapping = [for p in var.ports : port_mapping = [
for p in var.ports :
{ {
name = "port-${p}" name = "port-${p}"
internal_port = p internal_port = p
external_port = p external_port = p
protocol = "TCP" protocol = "TCP"
}] }
]
} }
data "kubernetes_service" "service" { data "kubernetes_service" "service" {
......
...@@ -79,3 +79,23 @@ variable "walrus_metadata_namespace_name" { ...@@ -79,3 +79,23 @@ variable "walrus_metadata_namespace_name" {
description = "Walrus metadata namespace name." description = "Walrus metadata namespace name."
default = "" default = ""
} }
# @label "probe_port"
# @group "Advanced"
variable "probe_http_port" {
description = "(Optional)http port for probe"
default = "80"
type = string
}
# @label "app_logs_path"
# @group "Advanced"
variable "volume_logs" {
default = "/data/java_log"
}
# @label "app_path"
# @group "Advanced"
variable "app_path" {
default = "/app/soft/java_project"
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!