add networking toolbox deployment [ci skip]
This commit is contained in:
parent
b3deb662af
commit
971926766c
4 changed files with 84 additions and 0 deletions
|
|
@ -690,3 +690,8 @@ module "navidrome" {
|
||||||
source = "./navidrome"
|
source = "./navidrome"
|
||||||
tls_secret_name = var.tls_secret_name
|
tls_secret_name = var.tls_secret_name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module "networking-toolbox" {
|
||||||
|
source = "./networking-toolbox"
|
||||||
|
tls_secret_name = var.tls_secret_name
|
||||||
|
}
|
||||||
|
|
|
||||||
79
modules/kubernetes/networking-toolbox/main.tf
Normal file
79
modules/kubernetes/networking-toolbox/main.tf
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
variable "tls_secret_name" {}
|
||||||
|
|
||||||
|
resource "kubernetes_namespace" "networking-toolbox" {
|
||||||
|
metadata {
|
||||||
|
name = "networking-toolbox"
|
||||||
|
labels = {
|
||||||
|
"istio-injection" : "disabled"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module "tls_secret" {
|
||||||
|
source = "../setup_tls_secret"
|
||||||
|
namespace = "networking-toolbox"
|
||||||
|
tls_secret_name = var.tls_secret_name
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "kubernetes_deployment" "networking-toolbox" {
|
||||||
|
metadata {
|
||||||
|
name = "networking-toolbox"
|
||||||
|
namespace = "networking-toolbox"
|
||||||
|
labels = {
|
||||||
|
app = "networking-toolbox"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spec {
|
||||||
|
replicas = 3
|
||||||
|
selector {
|
||||||
|
match_labels = {
|
||||||
|
app = "networking-toolbox"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
template {
|
||||||
|
metadata {
|
||||||
|
labels = {
|
||||||
|
app = "networking-toolbox"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spec {
|
||||||
|
container {
|
||||||
|
image = "lissy93/networking-toolbox"
|
||||||
|
name = "networking-toolbox"
|
||||||
|
port {
|
||||||
|
container_port = 3000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "kubernetes_service" "networking-toolbox" {
|
||||||
|
metadata {
|
||||||
|
name = "networking-toolbox"
|
||||||
|
namespace = "networking-toolbox"
|
||||||
|
labels = {
|
||||||
|
"app" = "networking-toolbox"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
spec {
|
||||||
|
selector = {
|
||||||
|
app = "networking-toolbox"
|
||||||
|
}
|
||||||
|
port {
|
||||||
|
name = "http"
|
||||||
|
port = "80"
|
||||||
|
target_port = "3000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module "ingress" {
|
||||||
|
source = "../ingress_factory"
|
||||||
|
namespace = "networking-toolbox"
|
||||||
|
name = "networking-toolbox"
|
||||||
|
tls_secret_name = var.tls_secret_name
|
||||||
|
protected = true
|
||||||
|
}
|
||||||
Binary file not shown.
BIN
terraform.tfvars
BIN
terraform.tfvars
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue