Skip to content

Conversation

@LucasMrqes
Copy link
Collaborator

@LucasMrqes LucasMrqes commented Mar 7, 2025

This PR adds a MaxConcurrentRunnerPods setting that can be set in the controller config and overriden in the TerraformRepository spec.
The setting defines the maximum number of concurrently running pods for burrito runners. No limit is defined if the setting is set to 0 (default).

The purpose of this is to limit the sudden burst in the amount workloads in the k8s cluster when a high amount of layers need to be planned or applied.

@github-project-automation github-project-automation bot moved this to 📋 Backlog in burrito Mar 7, 2025
@LucasMrqes LucasMrqes changed the title feat: add setting to limit maximum parallel runner pods feat: add setting to limit parallel runner pods Mar 7, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new setting to limit the number of concurrent runner pods by adding a configuration parameter that can be overridden both globally and per TerraformRepository. Key changes include:

  • Adding a new configuration field for max concurrent runner pods in various config files and CRDs.
  • Implementing logic in the controller to enforce the pod limit.
  • Updating documentation and Helm charts to reflect the new setting.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
mkdocs.yml Adds navigation link to the new runner scheduling documentation.
manifests/install.yaml Introduces a new CRD schema property "maxConcurrentRuns" for TerraformRepositorySpec.
manifests/crds/config.terraform.padok.cloud_terraformrepositories.yaml Mirrors the new CRD property for consistency.
internal/controllers/terraformrun/states.go Adds logic for checking the number of running pods against the configured limit.
internal/controllers/terraformrun/pod.go Updates default labels to include a new "burrito/component" value.
internal/burrito/config/testdata/test-config-1.yaml Adds the new configuration parameter for testing.
internal/burrito/config/config_test.go Extends configuration tests to include the new parameter override behavior.
internal/burrito/config/config.go Introduces the new configuration field mapped via "maxConcurrentRunnerPods".
docs/operator-manual/runner-scheduling.md Provides documentation on the new runner scheduling feature.
docs/operator-manual/advanced-configuration.md Updates configuration options table with the new parameter details.
deploy/charts/burrito/values.yaml Adds the new parameter in the Helm chart values.
cmd/controllers/start.go Introduces a new CLI flag for setting the maximum number of runner pods.
api/v1alpha1/terraformrepository_types.go Adds the "maxConcurrentRuns" field to the TerraformRepositorySpec.
Comments suppressed due to low confidence (1)

deploy/charts/burrito/values.yaml:32

  • The key 'MaxConcurrentRunnerPods' does not match the expected lower-case key 'maxConcurrentRunnerPods' as defined in the configuration mapping. Update the key to ensure proper configuration binding.
MaxConcurrentRunnerPods: 0

@LucasMrqes LucasMrqes force-pushed the feat/max-parallel-sync branch from d759a30 to 8f890a1 Compare April 8, 2025 15:08
@corrieriluca corrieriluca requested a review from Copilot April 8, 2025 15:11

This comment was marked as resolved.

@LucasMrqes LucasMrqes force-pushed the feat/max-parallel-sync branch from 8f890a1 to 75bd611 Compare April 8, 2025 15:13
@LucasMrqes LucasMrqes force-pushed the feat/max-parallel-sync branch from 75bd611 to 5c2f16f Compare April 8, 2025 15:14
@LucasMrqes LucasMrqes force-pushed the feat/max-parallel-sync branch from 9aadd40 to daf7339 Compare April 8, 2025 15:21
@LucasMrqes LucasMrqes changed the title feat: add setting to limit parallel runner pods feat: add setting to limit the number of concurrent runner pods Apr 8, 2025
@LucasMrqes LucasMrqes merged commit 9a7b5cb into main Apr 8, 2025
10 checks passed
@LucasMrqes LucasMrqes deleted the feat/max-parallel-sync branch April 8, 2025 15:28
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in burrito Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants