platform-engineering
Expertise on the CI/CD pipeline, remote builds using Argo Workflows, Kaniko, and GitHub Actions in the ARM64 K3s cluster.
SKILL.mdskills/platform-engineering/SKILL.md
GitHubPlatform Engineering & CI/CD Pipeline
Overview
This skill documents the CI/CD and Remote Build pipelines used in this K3s cluster. Building heavy images (like AI agents and Python ecosystems) on ARM64 nodes (CM4 and RK1) can cause high resource contention (OOMKill) and take a long time. To solve this, the cluster implements a hybrid approach: Local Builds (Kaniko + Argo) by default, and Remote Builds (GitHub Actions + Skopeo Sync) for heavy lifting.
Remote Build Pipeline (Argo + GitHub Actions)
We use a generic Ansible role called run-remote-build that orchestrates the following:
- GitHub CLI Auth: The
Makefileextracts yourgh auth tokenand injects it into Ansible asGITHUB_PAT. - Argo Workflow: Ansible creates an Argo Workflow (
build-{{ remote_app_name }}-remote) in thekanikonamespace. - Trigger: A container inside the workflow runs
gh workflow runto trigger the remote compilation on GitHub Actions' powerful servers. - Monitor: It watches the run using
gh run watch. - Skopeo Sync: Once the GitHub Action completes and pushes to
ghcr.io, the next Argo step uses Skopeo to download the image directly into the local registry (registry.registry:5000). - Tagging: To ensure the local cluster doesn't accidentally use the untested remote image, Skopeo appends the
-remotesuffix to the image tag (e.g.v2026.5.16-telegram-remote).
Available Makefile Commands
You can build all configured remote images by running:
make build-remote-all
Or trigger individual builds:
make build-remote-hermes
make build-remote-leloir
make build-remote-nas
How to add a new Remote Build
To add a new application to the remote build pipeline:
- Create the GitHub Action: Add
.github/workflows/build-<app>.ymlusingworkflow_dispatchwith inputsgit_refandimage_tag. - Update bootstrap.yml: Add a task calling
run-remote-buildspecifyingremote_app_name,remote_github_workflow,remote_ghcr_image, etc. - Update Makefile: Add a
build-remote-<app>target and include it inbuild-remote-all.