Skip to content

Commit

Permalink
Merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilWindle committed Dec 5, 2024
1 parent 6b2a2ca commit 2582b23
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions spartan/terraform/gke-cluster/firewall.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resource "google_compute_firewall" "udp_ingress" {
}
direction = "INGRESS"
source_ranges = ["0.0.0.0/0"]
target_tags = ["gke-node"]
target_tags = ["gke-node, aztec-gke-node"]
}

# Create egress firewall rules for UDP
Expand All @@ -21,7 +21,7 @@ resource "google_compute_firewall" "udp_egress" {
}
direction = "EGRESS"
destination_ranges = ["0.0.0.0/0"]
target_tags = ["gke-node"]
target_tags = ["gke-node, aztec-gke-node"]
}

# Create ingress firewall rules for TCP
Expand All @@ -34,7 +34,7 @@ resource "google_compute_firewall" "tcp_ingress" {
}
direction = "INGRESS"
source_ranges = ["0.0.0.0/0"]
target_tags = ["gke-node"]
target_tags = ["gke-node, aztec-gke-node"]
}

# Create egress firewall rules for TCP
Expand All @@ -47,5 +47,5 @@ resource "google_compute_firewall" "tcp_egress" {
}
direction = "EGRESS"
destination_ranges = ["0.0.0.0/0"]
target_tags = ["gke-node"]
target_tags = ["gke-node, aztec-gke-node"]
}
18 changes: 9 additions & 9 deletions spartan/terraform/gke-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ provider "google" {

# Create the service account
resource "google_service_account" "gke_sa" {
account_id = "gke-nodes-sa"
display_name = "GKE Nodes Service Account"
description = "Service account for GKE nodes"
account_id = "aztec-gke-nodes-sa"
display_name = "Aztec GKE Nodes Service Account"
description = "Service account for aztec GKE nodes"
}

# Add IAM roles to the service account
Expand Down Expand Up @@ -90,7 +90,7 @@ resource "google_container_node_pool" "primary_nodes" {
# Enable autoscaling
autoscaling {
min_node_count = 1
max_node_count = 5
max_node_count = 2
}

# Node configuration
Expand All @@ -105,7 +105,7 @@ resource "google_container_node_pool" "primary_nodes" {
labels = {
env = "production"
}
tags = ["gke-node"]
tags = ["aztec-gke-node"]
}

# Management configuration
Expand All @@ -129,7 +129,7 @@ resource "google_container_node_pool" "aztec_nodes" {

# Node configuration
node_config {
machine_type = "t2d-standard-8"
machine_type = "t2d-standard-4"

service_account = google_service_account.gke_sa.email
oauth_scopes = [
Expand All @@ -139,7 +139,7 @@ resource "google_container_node_pool" "aztec_nodes" {
labels = {
env = "production"
}
tags = ["gke-node", "aztec"]
tags = ["aztec-gke-node", "aztec"]
}

# Management configuration
Expand All @@ -151,7 +151,7 @@ resource "google_container_node_pool" "aztec_nodes" {

# Create spot instance node pool with autoscaling
resource "google_container_node_pool" "spot_nodes" {
name = "spot-node-pool"
name = "aztec-spot-node-pool"
location = var.zone
cluster = google_container_cluster.primary.name

Expand All @@ -175,7 +175,7 @@ resource "google_container_node_pool" "spot_nodes" {
env = "production"
pool = "spot"
}
tags = ["gke-node", "spot"]
tags = ["aztec-gke-node", "spot"]

# Spot instance termination handler
taint {
Expand Down

0 comments on commit 2582b23

Please sign in to comment.