initial
This commit is contained in:
commit
7a7bc34ae3
32 changed files with 4857 additions and 0 deletions
28
modules/kubernetes/bind/service-factory/main.tf
Normal file
28
modules/kubernetes/bind/service-factory/main.tf
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
variable "service_name" {}
|
||||
variable "port" {}
|
||||
|
||||
resource "kubernetes_service" "bind" {
|
||||
metadata {
|
||||
name = var.service_name
|
||||
namespace = "bind"
|
||||
annotations = {
|
||||
"metallb.universe.tf/allow-shared-ip" = "shared"
|
||||
}
|
||||
labels = {
|
||||
"app" = var.service_name
|
||||
}
|
||||
}
|
||||
spec {
|
||||
type = "LoadBalancer"
|
||||
external_traffic_policy = "Cluster"
|
||||
selector = {
|
||||
"app" = var.service_name
|
||||
}
|
||||
port {
|
||||
name = "dns"
|
||||
protocol = "UDP"
|
||||
port = var.port
|
||||
target_port = "53"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue