Skip to content

Commit

Permalink
Format terraform files
Browse files Browse the repository at this point in the history
  • Loading branch information
besher-massri committed Dec 5, 2024
1 parent f7a319a commit ff251c6
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 56 deletions.
38 changes: 19 additions & 19 deletions benchmarks/infra/65k-cpu-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ resource "google_compute_router" "router" {
}

resource "google_compute_router_nat" "nat" {
name = "nat-router-${var.cluster_name}"
router = google_compute_router.router.name
region = google_compute_router.router.region
nat_ip_allocate_option = "AUTO_ONLY"
name = "nat-router-${var.cluster_name}"
router = google_compute_router.router.name
region = google_compute_router.router.region
nat_ip_allocate_option = "AUTO_ONLY"
source_subnetwork_ip_ranges_to_nat = "ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES"
min_ports_per_vm = 64
min_ports_per_vm = 64

depends_on = [google_compute_router.router]
}

resource "google_container_cluster" "test_cluster" {
name = var.cluster_name
location = var.region
min_master_version = var.min_master_version
node_locations = var.node_locations
initial_node_count = var.initial_node_count
default_max_pods_per_node = 16
name = var.cluster_name
location = var.region
min_master_version = var.min_master_version
node_locations = var.node_locations
initial_node_count = var.initial_node_count
default_max_pods_per_node = 16

release_channel {
channel = "RAPID"
}
node_config {
machine_type = "e2-medium"
disk_size_gb = 20
disk_type = "pd-standard"
disk_type = "pd-standard"
labels = {
worker-node-pool = "true"
}
Expand All @@ -58,18 +58,18 @@ resource "google_container_cluster" "test_cluster" {
deletion_protection = false

# Networking-related options.
network = data.google_compute_network.vpc.id
subnetwork = google_compute_subnetwork.vpc.id
networking_mode = "VPC_NATIVE"
network = data.google_compute_network.vpc.id
subnetwork = google_compute_subnetwork.vpc.id
networking_mode = "VPC_NATIVE"
datapath_provider = var.datapath_provider

private_cluster_config {
enable_private_nodes = true
enable_private_nodes = true
master_ipv4_cidr_block = var.master_ipv4_cidr_block
}
ip_allocation_policy {
cluster_ipv4_cidr_block =var.cluster_ipv4_cidr_block
services_ipv4_cidr_block =var.services_ipv4_cidr_block
cluster_ipv4_cidr_block = var.cluster_ipv4_cidr_block
services_ipv4_cidr_block = var.services_ipv4_cidr_block
}

workload_identity_config {
Expand Down Expand Up @@ -126,7 +126,7 @@ resource "google_container_node_pool" "additional_pools" {
node_config {
machine_type = "e2-medium"
disk_size_gb = 20
disk_type = "pd-standard"
disk_type = "pd-standard"
labels = {
worker-node-pool = "true"
}
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/infra/65k-cpu-cluster/provider.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
provider "google" {
project = var.project_name
project = var.project_name
}
26 changes: 13 additions & 13 deletions benchmarks/infra/65k-cpu-cluster/sample-tfvars/65k-sample.tfvars
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
project_name = "$PROJECT_ID"
cluster_name = "gke-benchmark"
region = "us-central1"
min_master_version = "1.31.2"
vpc_network="$NETWORK"
node_locations = ["us-central1-a", "us-central1-b", "us-central1-c", "us-central1-f"]
datapath_provider = "ADVANCED_DATAPATH"
master_ipv4_cidr_block="172.16.0.0/28"
ip_cidr_range= "10.0.0.0/9"
cluster_ipv4_cidr_block = "/10"
project_name = "$PROJECT_ID"
cluster_name = "gke-benchmark"
region = "us-central1"
min_master_version = "1.31.2"
vpc_network = "$NETWORK"
node_locations = ["us-central1-a", "us-central1-b", "us-central1-c", "us-central1-f"]
datapath_provider = "ADVANCED_DATAPATH"
master_ipv4_cidr_block = "172.16.0.0/28"
ip_cidr_range = "10.0.0.0/9"
cluster_ipv4_cidr_block = "/10"
services_ipv4_cidr_block = "/18"
node_pool_count = 16
node_pool_size = 1000
initial_node_count = 250
node_pool_count = 16
node_pool_size = 1000
initial_node_count = 250
node_pool_create_timeout = "60m"
46 changes: 23 additions & 23 deletions benchmarks/infra/65k-cpu-cluster/variables.tf
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
variable "project_name" {
type = string
type = string
description = "Name of the project"
}

variable "cluster_name" {
type = string
type = string
description = "Name of the cluster"
}

variable "region" {
type = string
type = string
description = "Region to deploy the cluster"
}

variable "vpc_network"{
type = string
description ="Name of the VPC network to use for the cluster"
variable "vpc_network" {
type = string
description = "Name of the VPC network to use for the cluster"
}
variable "master_ipv4_cidr_block"{
type = string
description = " "
variable "master_ipv4_cidr_block" {
type = string
description = " "
}
variable "cluster_ipv4_cidr_block"{
type = string
variable "cluster_ipv4_cidr_block" {
type = string
}
variable "services_ipv4_cidr_block"{
type = string
variable "services_ipv4_cidr_block" {
type = string
}
variable "ip_cidr_range"{
type = string
description = " "
variable "ip_cidr_range" {
type = string
description = " "
}
variable "min_master_version" {
type = string
type = string
description = "Minimum master version for the cluster"
}

variable "node_locations" {
type = list(string)
type = list(string)
description = "List of zones where nodes will be deployed"
}

variable "initial_node_count" {
type = number
type = number
description = "Initial number of nodes in the cluster"
}

variable "datapath_provider" {
type = string
type = string
description = "Datapath provider for the cluster (e.g., 'LEGACY_DATAPATH' or 'ADVANCED_DATAPATH')"
}


variable "node_pool_count" {
type = number
type = number
description = "Number of additional node pools to create"
}

variable "node_pool_size" {
type = number
type = number
description = "Number of nodes in each additional node pool"
}

variable "node_pool_create_timeout" {
type = string
type = string
description = "Timeout for creating node pools"
}

0 comments on commit ff251c6

Please sign in to comment.