Skip to content

Commit 0645101

Browse files
Address feedback
1 parent 0337793 commit 0645101

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.ci/infrastructure/main.tf

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ resource "google_container_node_pool" "llvm_premerge_windows" {
105105
total_max_node_count = 2
106106
}
107107

108+
# We do not set a taint for the windows nodes as kubernetes by default sets
109+
# a node.kubernetes.io/os taint for windows nodes.
108110
node_config {
109111
machine_type = "c2d-highcpu-56"
110112
labels = {
@@ -255,11 +257,17 @@ resource "helm_release" "github_actions_runner_set_windows" {
255257
]
256258
}
257259

260+
resource "kubernetes_namespace" "grafana" {
261+
metadata {
262+
name = "grafana"
263+
}
264+
}
265+
258266
resource "helm_release" "grafana-k8s-monitoring" {
259267
name = "grafana-k8s-monitoring"
260268
repository = "https://grafana.github.io/helm-charts"
261269
chart = "k8s-monitoring"
262-
namespace = var.namespace
270+
namespace = "grafana"
263271
create_namespace = true
264272
atomic = true
265273
timeout = 300
@@ -325,6 +333,8 @@ resource "helm_release" "grafana-k8s-monitoring" {
325333
name = "opencost.opencost.prometheus.external.url"
326334
value = format("%s/api/prom", var.externalservices_prometheus_host)
327335
}
336+
337+
depends_on = [ kubernetes_namespace.grafana ]
328338
}
329339

330340
data "google_secret_manager_secret_version" "metrics_github_pat" {

.ci/infrastructure/vars.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
variable "namespace" {
2-
type = string
3-
default = "default"
4-
}
5-
61
variable "cluster_name" {
72
type = string
83
default = "llvm-premerge-prototype"

0 commit comments

Comments
 (0)