commiting defunct project for now

This commit is contained in:
shockrah 2024-07-26 16:38:57 -07:00
parent 67debbdb1c
commit 86da75aaf2
3 changed files with 31 additions and 20 deletions

View File

@ -1,12 +1,14 @@
resource kubernetes_ingress_v1 athens { resource kubernetes_ingress_v1 athens {
metadata { metadata {
name = var.shockrahxyz.name name = var.shockrahxyz.name
namespace = kubernetes_namespace.websites.metadata.0.name
labels = { labels = {
app = var.shockrahxyz.name app = "websites"
} }
} }
spec { spec {
rule { rule {
host = "test.shockrah.xyz"
http { http {
path { path {
backend { backend {
@ -25,4 +27,24 @@ resource kubernetes_ingress_v1 athens {
} }
resource kubernetes_service athens_lb {
metadata {
name = "athens-websites"
namespace = kubernetes_namespace.websites.metadata.0.name
labels = {
app = "websites"
}
}
spec {
selector = {
app = kubernetes_ingress_v1.athens.metadata.0.labels.app
}
port {
port = 80
target_port = 80
}
type = "LoadBalancer"
external_ips = [ var.cluster.ip ]
}
}

View File

@ -1,4 +1,4 @@
# Plain nginx for now so that we can test out reverse dns Plain nginx for now so that we can test out reverse dns
resource kubernetes_pod shockrah { resource kubernetes_pod shockrah {
metadata { metadata {
name = var.shockrahxyz.name name = var.shockrahxyz.name
@ -18,21 +18,4 @@ resource kubernetes_pod shockrah {
} }
} }
resource kubernetes_service shockrah {
metadata {
name = var.shockrahxyz.name
namespace = kubernetes_namespace.websites.metadata.0.name
labels = {
app = var.shockrahxyz.name
}
}
spec {
selector = {
app = kubernetes_pod.shockrah.metadata.0.name
}
port {
port = 80
}
type = "LoadBalancer"
}
}

View File

@ -27,3 +27,9 @@ variable shockrahxyz {
}) })
} }
variable cluster {
type = object({
ip = string
})
}