khuedoan-homelab/infra/modules/kubernetes-bootstrap/main.tf

86 lines
1.9 KiB
Terraform
Raw Normal View History

2021-04-20 19:24:23 +07:00
resource "helm_release" "metallb" {
name = "metallb"
repository = "https://charts.bitnami.com/bitnami"
chart = "metallb"
version = "2.3.5"
2021-04-20 19:24:23 +07:00
namespace = "metallb-system"
create_namespace = true
2021-05-01 22:14:00 +07:00
values = [
file("${path.module}/values/metallb.yaml")
]
2021-04-20 19:24:23 +07:00
}
resource "helm_release" "nginx" {
name = "ingress-nginx"
repository = "https://kubernetes.github.io/ingress-nginx"
chart = "ingress-nginx"
version = "3.29.0"
2021-04-20 19:24:23 +07:00
namespace = "ingress-nginx"
create_namespace = true
}
resource "helm_release" "cert_manager" {
name = "cert-manager"
repository = "https://charts.jetstack.io"
chart = "cert-manager"
version = "1.3.1"
2021-04-20 19:24:23 +07:00
namespace = "cert-manager"
create_namespace = true
values = [
file("${path.module}/values/cert-manager.yaml")
]
2021-04-20 19:24:23 +07:00
}
resource "helm_release" "prometheus" {
name = "kube-prometheus-stack"
repository = "https://prometheus-community.github.io/helm-charts"
chart = "kube-prometheus-stack"
version = "15.1.1"
2021-04-20 19:24:23 +07:00
namespace = "monitoring-system"
create_namespace = true
}
resource "helm_release" "longhorn" {
name = "longhorn"
repository = "https://charts.longhorn.io"
chart = "longhorn"
version = "1.1.0"
2021-04-20 19:24:23 +07:00
namespace = "longhorn-system"
create_namespace = true
}
2021-04-22 01:25:16 +07:00
resource "helm_release" "argocd" {
name = "argocd"
repository = "https://argoproj.github.io/argo-helm"
2021-04-24 13:45:13 +07:00
chart = "argo-cd"
2021-04-22 01:25:16 +07:00
version = "3.1.2"
namespace = "argocd"
create_namespace = true
}
2021-05-01 17:52:17 +07:00
resource "helm_release" "vault" {
name = "vault"
repository = "https://helm.releases.hashicorp.com"
chart = "vault"
version = "0.11.0"
namespace = "vault"
create_namespace = true
values = [
file("${path.module}/values/vault.yaml")
]
2021-05-01 22:51:55 +07:00
# TODO (optimize) HA Vault and auto unseal Vault
2021-05-01 17:52:17 +07:00
}
2021-04-20 19:24:23 +07:00
2021-05-01 22:51:55 +07:00
# TODO (feature) Automatic ingress and tunnel for all services