Giter Club home page Giter Club logo

terraform-kubectl-github-actions-runner's Introduction

terraform-kubectl-github-actions-runner

Setup the a GitHub Actions Runner in an existing kubernetes cluster

To setup the runner controller see the actions runner controller module from the terraform-kubectl-github-actions-runner-controller repository.

Module Usage

module "actions_runner" {
  source = "../.."

  repo_owner = "infinite-automations"
  repo_name  = "terraform-kubectl-github-actions-runner"
  labels     = var.labels

  namespace        = "github-actions-runner"
  create_namespace = true

  name                        = "github-actions-runner"
  runner_service_account_name = "github-actions-runner"
  job_service_account_name    = "github-actions-job"

  runner_image = "summerwind/actions-runner:latest"
  ephemeral    = true

  min_count                = 1
  max_count                = 3
  scale_down_delay_seconds = 300
  metrics = [
    {
      type               = "PercentageRunnersBusy"
      scaleUpThreshold   = "0.75"
      scaleDownThreshold = "0.25"
      scaleUpFactor      = "2"
      scaleDownFactor    = "0.5"
    },
    {
      "type"       = "TotalNumberOfQueuedAndInProgressWorkflowRuns"
      "repository" = "infinite-automations/terraform-kubectl-github-actions-runner"
      "name"       = "total"
    }
  ]

  storage_class_name = "standard"
  storage_size       = "100Mi"

  depends_on = [module.actions_runner_controller]
}

Requirements

Name Version
terraform >= 0.13
kubectl >= 1.14.0
kubernetes >= 2.23.0

Providers

Name Version
kubectl >= 1.14.0
kubernetes >= 2.23.0

Resources

Name Type
kubectl_manifest.runner resource
kubectl_manifest.runner_autoscaler resource
kubernetes_config_map.job-template resource
kubernetes_namespace.this resource
kubernetes_role.runner resource
kubernetes_role_binding.runner resource
kubernetes_secret.job resource
kubernetes_secret.runner resource
kubernetes_service_account.job resource
kubernetes_service_account.runner resource

Inputs

Name Description Type Default Required
repo_name The name of the repository string n/a yes
repo_owner The owner of the repository string n/a yes
create_namespace If true, the namespace will be created bool true no
ephemeral If true, the runner will be ephemeral bool true no
job_service_account_name The name of the service account for the job string "github-actions-job" no
labels The labels for the runner list(string)
[
"k8s",
"arc"
]
no
max_count The maximum number of runners number 3 no
metrics The metrics for the runner list(map(string))
[
{
"scaleDownFactor": "0.5",
"scaleDownThreshold": "0.25",
"scaleUpFactor": "2",
"scaleUpThreshold": "0.75",
"type": "PercentageRunnersBusy"
}
]
no
min_count The minimum number of runners number 1 no
name The name of the runner deployment string "github-actions-runner" no
namespace The namespace to deploy the runner controller into string "github-actions-runner" no
runner_image The image for the runner string "summerwind/actions-runner:latest" no
runner_service_account_name The name of the service account for the runner string "github-actions-runner" no
scale_down_delay_seconds The number of seconds from scaling out to wait before scaling down number 300 no
storage_class_name The storage class name for the runner string "default" no
storage_size The storage size for the runner string "100Mi" no

terraform-kubectl-github-actions-runner's People

Contributors

m4s-b3n avatar semantic-release-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.