Refacto and add modules

This commit is contained in:
2024-02-06 11:03:20 +01:00
parent 159b576b24
commit bcdf666cc0
47 changed files with 661 additions and 338 deletions

View File

@@ -15,7 +15,7 @@ variable "selector" {
default = null
}
variable "annotations" {
type = map(string)
type = map(string)
default = {}
}
variable "svc_type" {
@@ -26,6 +26,16 @@ variable "svc_type" {
error_message = "Only ClusterIP, ExternalName, NodePort or LoadBalancer is allowed"
}
}
variable "ip_family" {
type = string
default = "PreferDualStack"
validation {
condition = contains(["SingleStack", "PreferDualStack"], var.ip_family)
error_message = "Only SingleStack or PreferDualStack is allowed"
}
}
variable "ports" {
type = list(number)
default = [80]
@@ -55,8 +65,13 @@ variable "node_ports" {
}
}
variable "lb_ports" {
type = list(number)
default = [8080]
type = list(object({
name = string
port = object({
number = number
})
}))
default = []
}
variable "lb_policy" {
type = string