orchestration-tests/k8s-test/services/main.tf

97 lines
1.8 KiB
Terraform
Raw Normal View History

2022-03-03 22:51:42 +00:00
resource "kubernetes_manifest" "traefik_dashboard" {
manifest = {
apiVersion = "traefik.containo.us/v1alpha1"
kind = "IngressRoute"
metadata = {
name = "public-traefik-dashboard"
namespace = "default"
}
spec = {
entryPoints = [ "web" ]
routes = [
{
match = "PathPrefix(`/dashboard`) || PathPrefix(`/api`)"
kind = "Rule"
services = [
{
name = "api@internal"
kind = "TraefikService"
},
]
},
]
}
}
}
module "whoami" {
source = "./simple_service"
name = "whoami"
image = "containous/whoami:latest"
expose_ports = [80]
}
module "whoami-ingress" {
source = "./traefik_ingress"
2022-03-04 16:25:42 +00:00
2022-03-03 22:51:42 +00:00
app_name = "whoami"
match_route = "PathPrefix(`/whoami`)"
}
module "whoami2" {
source = "./simple_service"
name = "whoami2"
image = "containous/whoami:latest"
expose_ports = [80]
}
module "whoami2-ingress" {
source = "./traefik_ingress"
2022-03-04 16:25:42 +00:00
2022-03-03 22:51:42 +00:00
app_name = "whoami2"
match_route = "PathPrefix(`/whoami2`)"
}
2022-03-04 16:25:42 +00:00
2022-03-12 18:06:06 +00:00
module "authentik" {
source = "./authentik"
2022-03-04 16:25:42 +00:00
}
2022-03-12 18:06:06 +00:00
# locals {
# blocky_config = file("${path.module}/blocky_config.yml")
# }
#
# resource "helm_release" "blocky" {
# name = "blocky"
# repository = "https://k8s-at-home.com/charts/"
# chart = "blocky"
#
#
# set {
# name = "env.TZ"
# value = "America/Los_Angeles"
# }
#
# set {
# name = "metrics.enabled"
# value = true
# }
#
# set {
# name = "config"
# value = "${local.blocky_config}"
# }
# }
# resource "helm_release" "prom_stack" {
# name = "kube-prom-stack"
# repository = "https://prometheus-community.github.io/helm-charts"
# chart = "kube-prometheus-stack"
#
# set {
# name = "alert_manager.enabled"
# value = false
# }
# }