No description
  • Go 91.3%
  • Shell 5.8%
  • Nix 1.2%
  • Makefile 1.1%
  • Dockerfile 0.6%
Find a file
Martin McCaffery ec87a2aa3a
All checks were successful
ci / goreleaser (push) Successful in 2m2s
Go Tests / go-tests (push) Successful in 3m2s
Add APPLIED_SIZING to collector container env
2026-03-24 10:13:06 +01:00
.github/workflows Remove renovate workflow: now managed centrally 2026-03-17 10:50:05 +01:00
config feat: added container default sizing 2026-03-13 11:45:42 +01:00
hack feat: Added CGROUP_PROCESS_MAP config 2026-03-13 10:37:19 +01:00
internal/spec Add APPLIED_SIZING to collector container env 2026-03-24 10:13:06 +01:00
provider fix(provider): treat terminal pods as not-on-provider for Garm cleanup 2026-03-23 14:40:52 +01:00
runner fix(provider): treat terminal pods as not-on-provider for Garm cleanup 2026-03-23 14:40:52 +01:00
.gitignore fix: fixed token generation and push endpoint 2026-03-11 09:55:29 +01:00
.goreleaser.yaml chore: disable windows build 2026-03-12 16:58:33 +01:00
Dockerfile Switch to forgejo-supporting base image 2026-02-20 15:39:35 +01:00
flake.lock chore: Added flake 2026-03-10 13:51:11 +01:00
flake.nix chore: Added flake 2026-03-10 13:51:11 +01:00
go.mod feat: add ATTEMPT_URL to runner environment variables and update garm-provider-common dependency 2026-03-20 16:19:43 +01:00
go.sum feat: add ATTEMPT_URL to runner environment variables and update garm-provider-common dependency 2026-03-20 16:19:43 +01:00
main.go fix: update golangci-lint to v2.10.1 and fix lint issues 2026-02-18 11:12:10 +01:00
Makefile fix: update golangci-lint to v2.10.1 and fix lint issues 2026-02-18 11:12:10 +01:00
public.gpg ci(release): 🚀 Add release automation with GoReleaser 2025-11-07 15:08:05 +01:00
README.md feat: Added CGROUP_PROCESS_MAP config 2026-03-13 10:37:19 +01:00
renovate.json Add renovate 2026-03-17 09:28:21 +01:00

Prerequisites

Use this project in conjunction with the DevFW-CICD/garm project. (It is assumed that project is cloned to the folder 'garm'.)

Edit the credentials for access to Telekom Edge Cloud and set new Tag: In the garm project edit the file deploy.yaml:

  • Edit the credentials inside the Secret with name 'edge-connect-creds' by setting values (inside stringData.creds.toml) for username and password.
  • Edit the Deployment with name 'garm' by setting a new value (inside spec.template.spec.containers[0]) for the image (tag) of the form garm:provider-ec-[new_number].

Build and deploy the project

Use these commands in the current project.

docker buildx build -t edp.buildth.ing/devfw-cicd/garm:provider-ec-[new_number] --push .

kubectl apply -f ../garm/deploy.yaml

Don't forget to rebuild the ubuntu-host-runner if anything changed in the runner folder:

docker login edp.buildth.ing
docker buildx build --platform linux/amd64 --push -t edp.buildth.ing/devfw-cicd/ubuntu-host-runner:latest runner
docker buildx build --platform linux/amd64 --push -t edp.buildth.ing/devfw-cicd/ubuntu-host-runner:$(date +"%Y-%m-%d-%H%M") runner

Updating GARM

Information on resetting GARM can be found in the runner/ README.

Configuration

Kubernetes Sidecar Process Mapping

When the sizer collector sidecar is enabled ([kubernetes].sidecar_image is set), the provider injects CGROUP_PROCESS_MAP into the sidecar.

CGROUP_PROCESS_MAP is a JSON object mapping process name to container name, for example:

{"forgejo-runner":"runner","buildkitd":"buildkitd"}

You can configure the process names in [kubernetes]:

Key Default Description
runner_process_name forgejo-runner Process name mapped to container runner
buildkitd_process_name buildkitd Process name mapped to container buildkitd

Example:

[kubernetes]
sidecar_image = "edp.buildth.ing/devfw-cicd/forgejo-runner-sizer-collector:0.0.4"
runner_process_name = "forgejo-runner"
buildkitd_process_name = "buildkitd"

Extra Specs

You can configure runner behavior by passing extra specifications as JSON in the pool's extra_specs field.

Available Parameters

Parameter Type Default Value Description
runner_workdir string /runner/_work/ The working directory for the runner
disable_runner_update boolean true Whether to disable automatic runner updates
runner_ephemeral boolean true Whether the runner should be ephemeral (single-use)
pod_spec object See default below Custom Kubernetes PodSpec configuration

Basic Example

{
  "runner_workdir": "/custom/path/",
  "disable_runner_update": false,
  "runner_ephemeral": false
}

Custom PodSpec Example

You can provide a complete custom PodSpec to configure resource limits, additional containers, volumes, security contexts, etc:

{
  "runner_workdir": "/runner/_work/",
  "pod_spec": {
    "restartPolicy": "Never",
    "containers": [
      {
        "name": "runner",
        "image": "edp.buildth.ing/devfw-cicd/garm-act-runner:1",
        "imagePullPolicy": "Always",
        "env": [],
        "resources": {
          "requests": {
            "memory": "2Gi",
            "cpu": "1000m"
          },
          "limits": {
            "memory": "4Gi",
            "cpu": "2000m"
          }
        },
        "volumeMounts": [
          {
            "name": "runner-dir",
            "mountPath": "/runner"
          }
        ]
      }
    ],
    "volumes": [
      {
        "name": "runner-dir",
        "emptyDir": {}
      }
    ]
  }
}

Note: When providing a custom pod_spec, the environment variables required for the runner (such as RUNNER_TOKEN, METADATA_URL, etc.) are automatically injected into the first container if not already present in the custom spec. If you provide a custom PodSpec without environment variables, make sure the container configuration is compatible with the runner requirements.

Default PodSpec

If no pod_spec is provided, the following default configuration is used:

restartPolicy: Never
containers:
  - name: runner
    image: edp.buildth.ing/devfw-cicd/garm-act-runner:1
    imagePullPolicy: Always
    env: [auto-generated environment variables]
    volumeMounts:
      - name: runner-dir
        mountPath: /runner
volumes:
  - name: runner-dir
    emptyDir: {}

Logging

Logs are not passed through garm but written to file at /garm/edge-connect-k8s-provider.log in the garm container