mirror of
https://github.com/puppetmaster/typhoon.git
synced 2025-07-17 03:01:35 +02:00
Add Google Cloud worker instances to a target pool
* Background: A managed instance group of workers is used in backend services for global load balancing (HTTP/HTTPS Ingress) and output for custom global load balancing use cases * Add worker instances to a target pool load balancing TCP/UDP applications (NodePort or proxied). Output as `worker_target_pool` * Health check for workers with a healthy Ingress controller. Forward rules (regional) to target pools don't support different external and internal ports so choosing nodes with Ingress allows proxying as a workaround * A target pool is a logical grouping only. It doesn't add costs to clusters or worker pools
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# Regional managed instance group of workers
|
||||
# Managed instance group of workers
|
||||
resource "google_compute_region_instance_group_manager" "workers" {
|
||||
name = "${var.name}-worker-group"
|
||||
description = "Compute instance group of ${var.name} workers"
|
||||
@ -8,7 +8,8 @@ resource "google_compute_region_instance_group_manager" "workers" {
|
||||
instance_template = "${google_compute_instance_template.worker.self_link}"
|
||||
region = "${var.region}"
|
||||
|
||||
target_size = "${var.count}"
|
||||
target_size = "${var.count}"
|
||||
target_pools = ["${google_compute_target_pool.workers.self_link}"]
|
||||
|
||||
named_port {
|
||||
name = "http"
|
||||
|
Reference in New Issue
Block a user