This commit is contained in:
ari committed 2025-04-07 21:55:53 -04:00
1 parent 3d5d89f8b9
commit cdddf441fe
11 files changed
+198 -33

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
resource "helm_release" "plugins" {
for_each = var.plugins
name = each.key
chart = each.key
repository = each.value.repository
version = each.value.version
atomic = true
namespace = "plugin-${each.key}"
create_namespace = true
}
resource "helm_release" "infra" {
for_each = var.infra
name = each.key
chart = each.key
repository = each.value.repository
version = each.value.version
atomic = true
namespace = "infra-${each.key}"
create_namespace = true
}
+12
View File
@@ -0,0 +1,12 @@
output "namespaces" {
value = {
plugins = {
for k, v in helm_release.plugins :
k => v.namespace
}
infra = {
for k, v in helm_release.infra :
k => v.namespace
}
}
}
+27
View File
@@ -0,0 +1,27 @@
variable "plugins" {
type = map(object({
repository = string
version = string
values = optional(list(string), [])
}))
default = {
"external-secrets" : {
repository = "https://charts.external-secrets.io"
version = "0.14.2"
},
"metallb" : {
repository = "https://metallb.github.io/metallb"
version = "0.14.9"
}
}
}
variable "infra" {
type = map(object({
repository = string
version = string
values = optional(list(string), [])
}))
default = {}
}