mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 19:58:07 +03:00
terraform/gcp: Allow to use preemptible VM instances (#8480)
This commit is contained in:
@@ -231,6 +231,11 @@ resource "google_compute_instance" "master" {
|
||||
lifecycle {
|
||||
ignore_changes = [attached_disk]
|
||||
}
|
||||
|
||||
scheduling {
|
||||
preemptible = var.master_preemptible
|
||||
automatic_restart = !var.master_preemptible
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_compute_forwarding_rule" "master_lb" {
|
||||
@@ -328,6 +333,11 @@ resource "google_compute_instance" "worker" {
|
||||
lifecycle {
|
||||
ignore_changes = [attached_disk]
|
||||
}
|
||||
|
||||
scheduling {
|
||||
preemptible = var.worker_preemptible
|
||||
automatic_restart = !var.worker_preemptible
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_compute_address" "worker_lb" {
|
||||
|
||||
Reference in New Issue
Block a user