Skip to content

Commit

Permalink
Refactor namespace definitions and add GitHub Actions workflows variable
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Apr 4, 2025
1 parent ce9c503 commit 737c5f9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
33 changes: 25 additions & 8 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,31 @@ locals {
route53_endpoints = {}
}, var.common_variables)

all_namespaces = merge({
grafana = local.namespaces.telemetry_namespace
k8s-dashboard = local.namespaces.telemetry_namespace
loki = local.namespaces.telemetry_namespace
otel = local.namespaces.telemetry_namespace
prometheus = local.namespaces.telemetry_namespace
tempo = local.namespaces.telemetry_namespace
}, var.namespaces.custom_namespaces)
# First define base namespaces without dependencies
base_namespaces = {
cert-manager = "kube-system"
karpenter = "karpenter"
metrics-server = "kube-system"
postgresql = "kube-system"
keycloak = "keycloak"
gogatekeeper = "kube-system"
istio = "istio-system"
kiali = "istio-system"
}

# Then merge with telemetry namespaces
all_namespaces = merge(
local.base_namespaces,
{
grafana = var.namespaces.telemetry_namespace
k8s-dashboard = var.namespaces.telemetry_namespace
loki = var.namespaces.telemetry_namespace
otel = var.namespaces.telemetry_namespace
prometheus = var.namespaces.telemetry_namespace
tempo = var.namespaces.telemetry_namespace
},
var.namespaces.custom_namespaces
)

namespaces = {
operator_namespace = var.namespaces.operator_namespace
Expand Down
9 changes: 9 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,13 @@ variable "enable_modules" {
istio = optional(bool, false)
})
default = {}
}

variable "github_actions_workflows" {
description = "List of GitHub Actions workflow files to add to the repository"
type = list(object({
path = string
content = string
}))
default = []
}

0 comments on commit 737c5f9

Please sign in to comment.