Skip to content

fix(scaletest/terraform): fix prometheus namespace deps, disable auto-upgrade #8490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
hotfix(scaletest/terraform): fix prometheus namespace deps, disable a…
…uto-upgrade
  • Loading branch information
johnstcn committed Jul 13, 2023
commit 99e095245020a2c700e29af2ce83244c85d6001e
4 changes: 4 additions & 0 deletions scaletest/terraform/gcp_cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ resource "google_container_cluster" "primary" {
}
initial_node_count = 1
remove_default_node_pool = true

network_policy {
enabled = true
}
Expand Down Expand Up @@ -105,6 +106,9 @@ resource "google_container_node_pool" "misc" {
project = var.project_id
cluster = google_container_cluster.primary.name
node_count = var.state == "stopped" ? 0 : var.nodepool_size_misc
management {
auto_upgrade = false
}
node_config {
oauth_scopes = [
"https://www.googleapis.com/auth/logging.write",
Expand Down
7 changes: 4 additions & 3 deletions scaletest/terraform/prometheus.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ resource "null_resource" "prometheus_namespace" {

# Create a secret to store the remote write key
resource "kubernetes_secret" "prometheus-credentials" {
count = local.prometheus_remote_write_enabled ? 1 : 0
type = "kubernetes.io/basic-auth"
count = local.prometheus_remote_write_enabled ? 1 : 0
type = "kubernetes.io/basic-auth"
depends_on = [null_resource.prometheus_namespace]
metadata {
name = "prometheus-credentials"
namespace = local.prometheus_namespace
Expand Down Expand Up @@ -165,7 +166,7 @@ resource "local_file" "coder-monitoring-manifest" {
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
namespace: ${local.prometheus_namespace}
namespace: ${local.coder_namespace}
name: coder-monitoring
spec:
selector:
Expand Down