gitlab-runner

DeimosCloud/gitlab-runner/kubernetes

Terraform Module HCL KUBERNETES

Setup Gitlab Runner on cluster using terraform

Install
module "gitlab-runner" {
source = "DeimosCloud/gitlab-runner/kubernetes"
version = "1.4.0"
}
plain text: /constructs/tfmod-deimoscloud-gitlab-runner-kubernetes/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform Kubernetes Gitlab-Runner Module Setup Gitlab Runner on cluster using terraform. The runner is installed via the Gitlab Runner Helm Chart Ensure Kubernetes Provider and Helm Provider settings are correct https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/guides/getting-started#provider-setup Usage ``hcl module "gitlab_runner" { source = "DeimosCloud/gitlab-runner/kubernetes" release_name = "${var.project_name}-runner-${var.environment}" runner_tags = var.runner_tags runner_registration_token = var.runner_registration_token default_runner_image = var.default_runner_image namespace = var.gitlab_runner_namespace # Pass annotations to service account. This can be for workload/pod/ identity service_account_annotations = { "iam.gke.io/gcp-service-account" = module.

Inputs (43)
NameTypeDescriptionDefault
runner_namestringname of the runner required
build_dirstringPath on nodes for caching required
build_job_run_container_as_userstringSecurityContext: runAsUser for all running job pods required
values_filestringPath to Values file to be passed to gitlab-runner helm chart required
runner_registration_tokenstringrunner registration token required
runner_tokenstringtoken of already registered runer. to use this var.runner_registration_token mus required
runner_imagestringThe docker gitlab runner version. https://hub.docker.com/r/gitlab/gitlab-runner/ required
runner_tagsstringSpecify the tags associated with the runner. Comma-separated list of tags. required
additional_secretslist(map(string))additional secrets to mount into the manager pods[]
service_account_annotationsmapThe annotations to add to the service account{}
build_job_pod_labelsmapA map of labels to be added to each build pod created by the runner. The value o{}
manager_pod_labelsmapA map of labels to be added to each build pod created by the runner. The value o{}
manager_pod_annotationsmapA map of annotations to be added to each build pod created by the Runner. The va{}
manager_node_tolerationsmapA map of node tolerations to apply to the pods as defined https://docs.gitlab.co{}
unregister_runnersboolwhether runners should be unregistered when pool is deprovisionedtrue
service_accountstringThe name of the Service account to create"gitlab-runner"
runner_lockedstringSpecify whether the runner should be locked to a specific project/grouptrue
build_job_default_container_imagestringDefault container image to use for builds when none is specified"ubuntu:18.04"
build_job_mount_docker_socketboolPath on nodes for cachingfalse
replicasnumberthe number of manager pods to create1
concurrentnumberConfigure the maximum number of concurrent jobs10
local_cache_dirstringPath on nodes for caching"/tmp/gitlab/cache"
build_job_secret_volumesobject({ name = striSecret volume configuration instructs Kubernetes to use a secret that is defined{ "items": {}, "mount_path": null,
cacheobject({ type = string Describes the properties of the cache. type can be either of ['local', 'gcs', 's{ "azure": {}, "gcs": {}, "path":
namespacestring"gitlab-runner"
create_namespacebool(Optional) Create the namespace if it does not yet exist. Defaults to false.true
service_account_clusterwide_accessboolRun the gitlab-bastion container with the ability to deploy/manage containers offalse
build_job_requestsmap(any)The CPU allocation given to and the requested for build containers{ "cpu": "1", "memory": "512Mi" }
… and 3 more inputs
Outputs (3)
chart_version — The chart version
namespace — The namespace gitlab-runner was deployed in
release_name — The helm release name
Resources (1)
helm_release
Topics & Tags
terraformkubernetes
Details
FrameworkTerraform Module
LanguageHCL
Version1.4.0
Cloud KUBERNETES
★ Stars15
Forks22
Total downloads78.4k
Inputs43
Outputs3
Resources1
LicenseApache-2.0
NamespaceDeimosCloud
Updated