Skip to content

Commit

Permalink
by default disable agones-metrics nodepools (#3672)
Browse files Browse the repository at this point in the history
* by default disable agones-metrics nodepools

* updated documentation and added suggested changes

* reverted small change
  • Loading branch information
ashutosji authored Mar 6, 2024
1 parent 6e08bd8 commit 12d82a1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/includes/google-cloud.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ gcloud-test-cluster: GCP_CLUSTER_NODEPOOL_MIN_NODECOUNT ?= 1
gcloud-test-cluster: GCP_CLUSTER_NODEPOOL_MAX_NODECOUNT ?= 5
gcloud-test-cluster: GCP_CLUSTER_NODEPOOL_WINDOWSINITIALNODECOUNT ?= 0
gcloud-test-cluster: GCP_CLUSTER_NODEPOOL_WINDOWSMACHINETYPE ?= e2-standard-4
gcloud-test-cluster: GCP_CLUSTER_NODEPOOL_ENABLE_AGONES_METRICS_NODEPOOL ?= true
gcloud-test-cluster: $(ensure-build-image)
$(MAKE) gcloud-terraform-cluster GCP_TF_CLUSTER_NAME="$(GCP_CLUSTER_NAME)" \
GCP_CLUSTER_LOCATION="$(GCP_CLUSTER_LOCATION)" \
Expand All @@ -42,7 +43,8 @@ gcloud-test-cluster: $(ensure-build-image)
GCP_CLUSTER_NODEPOOL_MACHINETYPE="$(GCP_CLUSTER_NODEPOOL_MACHINETYPE)" \
GCP_CLUSTER_NODEPOOL_ENABLEIMAGESTREAMING="$(GCP_CLUSTER_NODEPOOL_ENABLEIMAGESTREAMING)" \
GCP_CLUSTER_NODEPOOL_WINDOWSINITIALNODECOUNT="$(GCP_CLUSTER_NODEPOOL_WINDOWSINITIALNODECOUNT)" \
GCP_CLUSTER_NODEPOOL_WINDOWSMACHINETYPE="$(GCP_CLUSTER_NODEPOOL_WINDOWSMACHINETYPE)"
GCP_CLUSTER_NODEPOOL_WINDOWSMACHINETYPE="$(GCP_CLUSTER_NODEPOOL_WINDOWSMACHINETYPE)" \
GCP_CLUSTER_NODEPOOL_ENABLE_AGONES_METRICS_NODEPOOL="$(GCP_CLUSTER_NODEPOOL_ENABLE_AGONES_METRICS_NODEPOOL)"
$(MAKE) gcloud-auth-cluster

clean-gcloud-test-cluster: $(ensure-build-image)
Expand Down
1 change: 1 addition & 0 deletions install/terraform/modules/gke/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ resource "google_container_node_pool" "agones-system" {
}

resource "google_container_node_pool" "agones-metrics" {
count = var.enable_agones_metrics_nodepool ? 1 : 0
name = "agones-metrics"
cluster = google_container_cluster.primary.id
node_count = 1
Expand Down
7 changes: 7 additions & 0 deletions install/terraform/modules/gke/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,10 @@ variable "firewallName" {
type = string
default = ""
}

# enable_agones_metrics_nodepool specifies whether to enable agones-metrics node pool
# By default it is disabled
variable "enable_agones_metrics_nodepool" {
description = "enable or disable the creation of agones-metrics node pool."
default = false
}
3 changes: 3 additions & 0 deletions site/content/en/docs/Installation/Terraform/gke.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ Configurable parameters:
- autoscale - whether you want to enable autoscale for the gameserver nodepool (default is false)
- min_node_count - the minimum number of nodes for a nodepool when autoscale is enabled (default is "1")
- max_node_count - the maximum number of nodes for a nodepool when autoscale is enabled (default is "5")
{{% feature publishVersion="1.38.0" %}}

This comment has been minimized.

Copy link
@roberthbailey

roberthbailey Mar 11, 2024

Member

Just noticed that the publish version here is incorrect (it should have been 1.39 which is tomorrow's release).

Not worth fixing now, but an FYI to @Kalaiselvi84 to make sure we remove this even though it has the wrong version number.

This comment has been minimized.

Copy link
@Kalaiselvi84

Kalaiselvi84 Mar 11, 2024

Contributor

will delete this feature block during the release processs. 👍🏻

- enable_agones_metrics_nodepool - whether you want to enable `"agones-metrics"` for the gameserver nodepool (default is false)
{{% /feature %}}
{{% alert title="Warning" color="warning"%}}
On the lines that read `source = "git::https://github.com/googleforgames/agones.git//install/terraform/modules/gke/?ref=main"`
Expand Down

0 comments on commit 12d82a1

Please sign in to comment.