Compare commits
2 Commits
9454e03f53
...
7f5d81f0ee
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f5d81f0ee | |||
| 410790765f |
47
infra/vultr-kubernetes/health.tf
Normal file
47
infra/vultr-kubernetes/health.tf
Normal file
@ -0,0 +1,47 @@
|
||||
resource kubernetes_deployment health {
|
||||
metadata {
|
||||
name = "health"
|
||||
namespace = var.playground.namespace
|
||||
}
|
||||
spec {
|
||||
replicas = 1
|
||||
selector {
|
||||
match_labels = {
|
||||
name = "health"
|
||||
}
|
||||
}
|
||||
template {
|
||||
metadata {
|
||||
labels = {
|
||||
name = "health"
|
||||
}
|
||||
}
|
||||
spec {
|
||||
container {
|
||||
name = "health"
|
||||
image = "quanhua92/whoami:latest"
|
||||
port {
|
||||
container_port = "8080"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource kubernetes_service health {
|
||||
metadata {
|
||||
name = "health"
|
||||
namespace = var.playground.namespace
|
||||
}
|
||||
spec {
|
||||
selector = {
|
||||
name = "health"
|
||||
}
|
||||
port {
|
||||
port = 80
|
||||
target_port = 8080
|
||||
name = "http"
|
||||
}
|
||||
}
|
||||
}
|
||||
8
infra/vultr-kubernetes/namespaces.tf
Normal file
8
infra/vultr-kubernetes/namespaces.tf
Normal file
@ -0,0 +1,8 @@
|
||||
resource kubernetes_namespace playground {
|
||||
metadata {
|
||||
annotations = {
|
||||
names = var.playground.namespace
|
||||
}
|
||||
name = var.playground.namespace
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: testing
|
||||
labels:
|
||||
name: testing
|
||||
@ -37,7 +37,7 @@ variable cluster {
|
||||
}
|
||||
|
||||
|
||||
variable personal {
|
||||
variable playground {
|
||||
type = object({
|
||||
namespace = string
|
||||
})
|
||||
|
||||
@ -14,8 +14,8 @@ cluster = {
|
||||
}
|
||||
}
|
||||
|
||||
personal = {
|
||||
namespace = "athens-main"
|
||||
playground = {
|
||||
namespace = "playground"
|
||||
}
|
||||
|
||||
bastion = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user