Loadtest - osquery_perf - Removal of fleet_image requirement (#35365)

- Adds support for `enroll.sh`, to deploy osquery_perf in batches
- Merges variables `tag` and `git_branch` into `git_tag_branch`. Only
one tag or git_branch should be specified.
  - Still used for osquery_perf to check out the correct tag/branch.
- Removes fleet_image requirement for cutting osquery_perf images

---------

Co-authored-by: Robert Fairburn <8029478+rfairburn@users.noreply.github.com>
This commit is contained in:
Jorge Falcon
2025-11-10 16:16:20 -05:00
committed by GitHub
co-authored by Robert Fairburn
parent a3170ad8d9
commit 0471b8ce19
8 changed files with 76 additions and 38 deletions
+15 -12
View File
@@ -7,20 +7,19 @@ on:
description: "Terraform workspace that you will be deploying to."
type: string
required: true
tag:
description: "Tag for osquery-perf deployment"
type: string
default: "v4.72.0"
required: true
git_branch:
description: "git branch for osquery-perf deployment"
git_tag_branch:
description: "git Tag or Branch to use for osquery-perf deployment"
type: string
default: "main"
required: true
loadtest_containers:
description: "Count of osquery-perf tasks to run"
description: "Deploys osquery-perf containers all at once. Total number of osquery-perf tasks to run (should be a multiple of 8, if setting loadtest_containers_starting_index). This is also used as the end index in enroll.sh"
type: string
required: true
loadtest_containers_starting_index:
description: "Optional: Starting Index for enroll.sh (should be a multiple of 8)."
type: string
required: false
extra_flags:
description: "Extra flags for osquery-perf. Example: [\"--orbit_prob\", \"0.0\"]"
type: string
@@ -52,8 +51,7 @@ env:
TF_ACTIONS_WORKING_DIR: infrastructure/loadtesting/terraform/osquery_perf
TF_VAR_extra_flags: "${{ inputs.extra_flags || '[]' }}"
TF_VAR_loadtest_containers: "${{ inputs.loadtest_containers }}"
TF_VAR_tag: "${{ inputs.tag }}"
TF_VAR_git_branch: "${{ inputs.git_branch }}"
TF_VAR_git_tag_branch: "${{ inputs.git_tag_branch }}"
permissions:
id-token: write
@@ -145,7 +143,12 @@ jobs:
if [[ `terraform workspace show` = "${{ inputs.terraform_workspace }}" ]];
then
echo "TERRAFORM WORKSPACE: MATCHES - ${{ inputs.terraform_workspace }}"
terraform apply -auto-approve
if [[ ${{ inputs.loadtest_containers_starting_index}} -gt "0" ]];
then
./enroll.sh ${{ inputs.git_tag_branch }} ${{ inputs.loadtest_containers_starting_index}} ${{ inputs.loadtest_containers }}
else
terraform apply -auto-approve
fi
else
echo "TERRAFORM WORKSPACE: DOES NOT MATCH INPUT - ${{ inputs.terraform_workspace }}"
fi
@@ -202,4 +205,4 @@ jobs:
fi
else
echo "TERRAFORM WORKSPACE: DOES NOT MATCH INPUT - ${{ inputs.terraform_workspace }}"
fi
fi