Skip to content

Commit 597bb22

Browse files
refactor: reorganize modules to separate infra deployment and runner orchestration (#2)
1 parent 3c5ee0d commit 597bb22

File tree

250 files changed

+2508
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

250 files changed

+2508
-163
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ repos:
4545
- id: double-quote-string-fixer
4646
always_run: true
4747

48-
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
49-
rev: 0.2.3
50-
hooks:
51-
- id: yamlfmt
52-
always_run: true
53-
args: [--mapping, '2', --sequence, '4', --offset, '2', --width, '180']
54-
exclude: (ansible/)
55-
5648
- repo: http://github.com/jumanjihouse/pre-commit-hooks
5749
rev: 3.0.0
5850
hooks:
@@ -119,30 +111,25 @@ repos:
119111
- id: terraform_tflint
120112
args:
121113
- --hook-config=--tf-path=tofu
122-
exclude: (modules/infra-modules/splunk_cloud_data_manager)
114+
exclude: (modules/integrations/splunk_cloud_data_manager)
123115
always_run: true
124116
- id: terraform_validate
125117
args:
126118
- --hook-config=--retry-once-with-cleanup=true
127119
- --tf-init-args=-backend=false
128120
- --hook-config=--tf-path=tofu
129-
exclude: (modules/infra-modules/splunk_cloud_data_manager)
121+
exclude: (modules/integrations/splunk_cloud_data_manager)
130122
always_run: true
131123
- id: terraform_docs
132124
always_run: true
133125
args:
134126
- --hook-config=--tf-path=tofu
135127
- --args=--config=.terraform-docs.yml
136-
exclude: (modules/infra-modules/splunk_cloud_data_manager)
128+
exclude: (modules/integrations/splunk_cloud_data_manager)
137129

138130
# Security Hooks
139131
- repo: https://github.com/gitleaks/gitleaks
140132
rev: v8.25.1
141133
hooks:
142134
- id: gitleaks
143135
always_run: true
144-
145-
- repo: https://github.com/python-poetry/poetry
146-
rev: 2.1.2
147-
hooks:
148-
- id: poetry-check

modules/forge-modules/arc_runners/submodules/multi_arc/README.md renamed to modules/core/arc/README.md

Lines changed: 3 additions & 3 deletions

modules/forge-modules/arc_runners/submodules/multi_arc/data.tf renamed to modules/core/arc/data.tf

File renamed without changes.

modules/forge-modules/arc_runners/submodules/multi_arc/rs.tf renamed to modules/core/arc/main.tf

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
module "rs" {
2-
source = "./submodules/gha_runner_scale_set"
1+
module "controller" {
2+
count = length(var.multi_runner_config) > 0 ? 1 : 0
3+
source = "./scale_set_controller"
4+
5+
# Helm Chart Configuration
6+
release_name = var.controller_config.release_name
7+
namespace = var.controller_config.namespace
8+
chart_name = var.controller_config.chart_name
9+
chart_version = var.controller_config.chart_version
10+
11+
controller_config = {
12+
name = var.controller_config.name
13+
}
14+
15+
github_app = var.github_app
16+
}
17+
18+
module "scale_sets" {
19+
source = "./scale_set"
320
for_each = coalesce(var.multi_runner_config, {})
421

522
# EKS Cluster Configuration
@@ -37,7 +54,7 @@ module "rs" {
3754
iam_role_name = "${each.value.runner_config.prefix}-arc-runner-role"
3855
runner_iam_role_managed_policy_arns = each.value.runner_config.runner_iam_role_managed_policy_arns
3956

40-
depends_on = [module.rsc]
57+
depends_on = [module.controller]
4158

4259
tags = var.tags
4360
}

modules/forge-modules/arc_runners/submodules/multi_arc/outputs.tf renamed to modules/core/arc/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
output "runners_map" {
2-
value = { for key, value in module.rs : key => value }
2+
value = { for key, value in module.scale_sets : key => value }
33
}
44

55
output "subnet_cidr_blocks" {

modules/forge-modules/arc_runners/submodules/multi_arc/providers.tf renamed to modules/core/arc/providers.tf

File renamed without changes.

modules/forge-modules/arc_runners/submodules/multi_arc/submodules/gha_runner_scale_set/README.md renamed to modules/core/arc/scale_set/README.md

Lines changed: 3 additions & 3 deletions

modules/forge-modules/arc_runners/submodules/multi_arc/submodules/gha_runner_scale_set/helm.tf renamed to modules/core/arc/scale_set/helm.tf

File renamed without changes.

modules/forge-modules/arc_runners/submodules/multi_arc/submodules/gha_runner_scale_set/locals.tf renamed to modules/core/arc/scale_set/locals.tf

File renamed without changes.

modules/forge-modules/arc_runners/submodules/multi_arc/submodules/gha_runner_scale_set/outputs.tf renamed to modules/core/arc/scale_set/outputs.tf

File renamed without changes.

0 commit comments

Comments
 (0)