Compare commits

...

2 Commits

Author SHA1 Message Date
7f5d81f0ee Deployment and Service for a simple health check tier service
Some checks failed
Ansible Linting / ansible-lint (push) Failing after 6s
Secops Linting and Safety Checks / checkov-scan-s3 (push) Failing after 19s
2025-09-17 22:37:03 -07:00
410790765f Creating new namespace in cluster for random k8s experiments 2025-09-17 22:33:34 -07:00
5 changed files with 58 additions and 9 deletions

View 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"
}
}
}

View File

@ -0,0 +1,8 @@
resource kubernetes_namespace playground {
metadata {
annotations = {
names = var.playground.namespace
}
name = var.playground.namespace
}
}

View File

@ -1,6 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: testing
labels:
name: testing

View File

@ -37,7 +37,7 @@ variable cluster {
}
variable personal {
variable playground {
type = object({
namespace = string
})

View File

@ -14,8 +14,8 @@ cluster = {
}
}
personal = {
namespace = "athens-main"
playground = {
namespace = "playground"
}
bastion = {