Commit 5f6e5a92 by chenxx

update 6

1 parent 94414503
...@@ -51,7 +51,15 @@ module "deployment" { ...@@ -51,7 +51,15 @@ module "deployment" {
] ]
#domian map #domian map
host_aliases = var.hosts host_aliases = [
for host_list in var.hosts : [
for h in host_list.hostname :
{
hostname = h,
ip = ip
}
]
]
} }
...@@ -87,7 +95,9 @@ module "ingress" { ...@@ -87,7 +95,9 @@ module "ingress" {
rule = [ rule = [
{ {
domain = var.ingress_switch.domain_name domain = var.ingress_switch.domain_name
external_port = var.ports[0] // Service port external_port = var.ports[
0
] // Service port
path = var.ingress_switch.path path = var.ingress_switch.path
path_type = var.ingress_switch.path_type path_type = var.ingress_switch.path_type
} }
......
...@@ -145,6 +145,6 @@ variable "ingress_switch" { ...@@ -145,6 +145,6 @@ variable "ingress_switch" {
# @group "Advanced" # @group "Advanced"
variable "hosts" { variable "hosts" {
type = list(object({ hostname = list(string), ip = string })) type = list(object({ hostname = list(string), ip = string }))
description = "(Optional) Add /etc/hosts records to pods" description = "(Optional) host aliases 手动配置域名到hosts"
default = [] default = []
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!