mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 06:57:47 +01:00
69 lines
1.8 KiB
HCL
69 lines
1.8 KiB
HCL
terraform {
|
|
required_providers {
|
|
kubectl = {
|
|
source = "gavinbunney/kubectl"
|
|
version = "1.19.0"
|
|
}
|
|
helm = {
|
|
source = "hashicorp/helm"
|
|
version = "3.0.2"
|
|
}
|
|
kubernetes = {
|
|
source = "hashicorp/kubernetes"
|
|
version = "2.38.0"
|
|
}
|
|
kustomization = {
|
|
source = "kbst/kustomization"
|
|
version = "0.9.6"
|
|
}
|
|
time = {
|
|
source = "hashicorp/time"
|
|
version = "0.13.1"
|
|
}
|
|
}
|
|
}
|
|
|
|
resource "helm_release" "redis_operator" {
|
|
name = "redis-operator"
|
|
repository = "https://ot-container-kit.github.io/helm-charts/"
|
|
chart = "redis-operator"
|
|
namespace = "ot-operators"
|
|
create_namespace = true
|
|
}
|
|
|
|
resource "kubectl_manifest" "replication" {
|
|
yaml_body = templatefile("${path.module}/replication.yaml", {})
|
|
depends_on = [helm_release.redis_operator]
|
|
}
|
|
|
|
resource "kubectl_manifest" "sentinel" {
|
|
yaml_body = templatefile("${path.module}/sentinel.yaml", {})
|
|
depends_on = [kubectl_manifest.replication]
|
|
}
|
|
|
|
resource "helm_release" "redisinsight_gui" {
|
|
name = "redisinsight-gui"
|
|
repository = "https://mrnim94.github.io/redisinsight/"
|
|
chart = "redisinsight"
|
|
namespace = "ot-operators"
|
|
create_namespace = false
|
|
version = "1.3.1" # ověř verzi podle ArtifactHub / podle toho koho chceš použít
|
|
|
|
depends_on = [kubectl_manifest.sentinel]
|
|
# případně values
|
|
# values = [file("${path.module}/values-redisinsight.yaml")]
|
|
|
|
set = [{
|
|
#name = "persistence.storageClassName"
|
|
#value = "longhorn"
|
|
name = "persistence.enabled"
|
|
value = "false"
|
|
}]
|
|
}
|
|
|
|
resource "kubectl_manifest" "redis-ui" {
|
|
yaml_body = templatefile("${path.module}/redis-ui.yaml", {
|
|
base_domain = var.cloudflare_base_domain
|
|
})
|
|
}
|