Last active
January 25, 2019 06:45
-
-
Save tuannvm/cc39e7fbe71a0b1052fe31fb7ca49907 to your computer and use it in GitHub Desktop.
#90s #blog #gitlab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "google_container_node_pool" "gitlab_runner" { | |
autoscaling = { | |
min_node_count = 1 | |
max_node_count = 6 | |
} | |
node_config { | |
machine_type = "n1-standard-8" | |
preemptible = true | |
} | |
} | |
resource "google_container_cluster" "ci" { | |
name = "ci-cluster" | |
# IMPORTANT: to ignore changes from separately-managed node pools | |
lifecycle { | |
ignore_changes = ["node_pool"] | |
} | |
addons_config { | |
# unused feature, just disable | |
http_load_balancing { | |
disabled = true | |
} | |
} | |
network_policy { | |
enabled = true | |
provider = "CALICO" | |
} | |
# Must create pod policy first !!! | |
pod_security_policy_config = { | |
enabled = false | |
} | |
node_pool { | |
name = "default-pool" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment