Skip to content

Commit c98ebec

Browse files
authored
Merge pull request #391 from cloudfoundry/configure_placement_strategy
Make Concourse worker placement strategy configurable
2 parents 09197b6 + 5043b8c commit c98ebec

File tree

7 files changed

+20
-2
lines changed

7 files changed

+20
-2
lines changed

docs/concourse/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ Also make sure that the GKE version is not outdated:
5252

5353
The latest stable version can be found at [https://cloud.google.com/kubernetes-engine/docs/release-notes]
5454

55+
If you need to fine-tune the [Concourse worker placement strategy](https://concourse-ci.org/container-placement.html), you can configure it with:
56+
57+
* `concourse_container_placement_strategy`
58+
5559
#### 2. Logon to your GCP account
5660
```
5761
gcloud auth login && gcloud auth application-default login

terraform-modules/concourse/app/concourse.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ data "helm_template" "concourse" {
3131
value = ""
3232
}
3333

34+
set {
35+
name = "concourse.web.containerPlacementStrategy"
36+
value = var.concourse_container_placement_strategy
37+
}
38+
3439
set {
3540
name = "worker.replicas"
3641
value = var.gke_workers_pool_node_count

terraform-modules/concourse/app/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ variable "gke_default_pool_node_count" { nullable = false }
1212
variable "concourse_helm_version" { nullable = false }
1313
variable "concourse_github_mainTeam" { nullable = false }
1414
variable "concourse_github_mainTeamUser" { nullable = false }
15+
variable "concourse_container_placement_strategy" { nullable = false }
1516

1617
variable "load_balancer_ip" { nullable = false }
1718
variable "load_balancer_dns" { nullable = false }

terragrunt/concourse-wg-ci-test/app/terragrunt.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ inputs = {
5151

5252
concourse_github_mainTeam = local.config.concourse_github_mainTeam
5353
concourse_github_mainTeamUser = local.config.concourse_github_mainTeamUser
54-
54+
concourse_container_placement_strategy = local.config.concourse_container_placement_strategy
5555
}

terragrunt/concourse-wg-ci-test/config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ gke_name: wg-ci-test
2020
concourse_github_mainTeam: "cloudfoundry:wg-app-runtime-interfaces-autoscaler-approvers\\,cloudfoundry:wg-app-runtime-interfaces-autoscaler-reviewers\\,cloudfoundry:wg-app-runtime-interfaces-capi-approvers"
2121
concourse_github_mainTeamUser: ""
2222

23+
# Concourse worker placement strategy: https://concourse-ci.org/container-placement.html
24+
# Use default strategy for test system
25+
concourse_container_placement_strategy: "volume-locality"
26+
2327
# Concourse helm chart
2428
concourse_helm_version: "17.4.0"
2529

terragrunt/concourse-wg-ci/app/terragrunt.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ inputs = {
5151

5252
concourse_github_mainTeam = local.config.concourse_github_mainTeam
5353
concourse_github_mainTeamUser = local.config.concourse_github_mainTeamUser
54-
54+
concourse_container_placement_strategy = local.config.concourse_container_placement_strategy
5555
}

terragrunt/concourse-wg-ci/config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ gke_name: wg-ci
2020
concourse_github_mainTeam: "cloudfoundry:wg-app-runtime-interfaces-autoscaler-approvers\\,cloudfoundry:wg-app-runtime-interfaces-capi-approvers"
2121
concourse_github_mainTeamUser: ""
2222

23+
# Concourse worker placement strategy: https://concourse-ci.org/container-placement.html
24+
# The cloud controller unit tests cause a high system load on workers, so place them on workers with few containers
25+
concourse_container_placement_strategy: "fewest-build-containers"
26+
2327
# Concourse helm chart
2428
concourse_helm_version: "17.4.0"
2529

0 commit comments

Comments
 (0)