{"id":19002306,"url":"https://github.com/linkerd/dev","last_synced_at":"2026-04-20T10:30:19.686Z","repository":{"id":63438728,"uuid":"525995650","full_name":"linkerd/dev","owner":"linkerd","description":"Development tooling for Linkerd repositories","archived":false,"fork":false,"pushed_at":"2024-12-30T04:17:56.000Z","size":114,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-01-01T18:42:38.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linkerd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-18T00:12:45.000Z","updated_at":"2024-12-06T00:42:25.000Z","dependencies_parsed_at":"2023-02-05T07:01:59.647Z","dependency_job_id":"1f50b1e3-6b56-438e-bc37-c29f95b20ba0","html_url":"https://github.com/linkerd/dev","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkerd%2Fdev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkerd%2Fdev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkerd%2Fdev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkerd%2Fdev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkerd","download_url":"https://codeload.github.com/linkerd/dev/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240026589,"owners_count":19736202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T18:14:36.030Z","updated_at":"2026-04-20T10:30:19.653Z","avatar_url":"https://github.com/linkerd.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linkerd-dev\n\nThis repository contains utilities for managing the Linkerd development\nenvironment, especially a [devcontainer](https://containers.dev/). It also\nprovides a foundation of reusable tools for CI (in GitHub Actions).\n\nThis repository is **NOT** intended to be used typical Linkerd development. This\nrepository includes submodules only for the purpose of validating and automating\ndev tooling changes.\n\n## Devcontainer\n\nThe *devcontainer* image provides all of the tools needed for interactive\ndevelopment. Images are tagged as `ghcr.io/linkerd/dev:vNN` and is expected to\nbe set in a `.devcontainer.json` file. For example:\n\n```jsonc\n{\n    \"name\": \"linkerd-dev\",\n    \"image\": \"ghcr.io/linkerd/dev:v43\",\n    \"extensions\": [\n        \"DavidAnson.vscode-markdownlint\",\n        \"golang.go\",\n        \"kokakiwi.vscode-just\",\n        \"ms-kubernetes-tools.vscode-kubernetes-tools\",\n        \"NathanRidley.autotrim\",\n        \"rust-lang.rust-analyzer\",\n        \"samverschueren.final-newline\",\n        \"tamasfe.even-better-toml\",\n        \"zxh404.vscode-proto3\"\n    ],\n    \"settings\": {\n        \"go.lintTool\": \"golangci-lint\"\n    },\n    \"runArgs\": [\n        \"--init\",\n        // Limit container memory usage.\n        \"--memory=12g\",\n        \"--memory-swap=12g\",\n        // Use the host network so we can access k3d, etc.\n        \"--net=host\"\n    ],\n    \"overrideCommand\": false,\n    \"remoteUser\": \"code\",\n    \"mounts\": [\n        {\n            \"source\": \"/var/run/docker.sock\",\n            \"target\": \"/var/run/docker-host.sock\",\n            \"type\": \"bind\"\n        },\n        {\n            \"source\": \"${localEnv:HOME}/.docker\",\n            \"target\": \"/home/code/.docker\",\n            \"type\": \"bind\"\n        }\n    ]\n}\n```\n\nSeveral containers and setup actions are provided to configure GitHub Actions\nworkflows.\n\n## Tools\n\nThis repository also includes additional tools in [bin/]. These scripts capture\nsome common build and testing tasks. Most of these scripts are implemented with\n[`just`](https://just.systems/). Just is a tool for writing build and test\n'recipes'. These recipes may be invoked in the course of development or from\n\n- **just-dev** lints for Devcontainer configuration and GitHub Actions workflows\n- **just-cargo** helpers for running cargo, especially in CI\n- **just-k3d** helpers for interacting with k3d clusters used for testing\n- **just-md** lints markdown in a repository\n- **just-sh** lints shell scripts in a respository.\n\n### `just-k3d`\n\nWhen using `just-k3d` to create k3d clusters, the `K3S_CHANNEL` environment\nvariable controls the version of Kubernetes used in k3d. This value must\ncorrespond to a channel in [`./k3s-images.json`](k3s-images.json), which is\nstored statically in the tools and devcontainer images. This prevents the k3s\nversion from varying dynamically without updating the dev image.\n\nThis file is generated by running `just sync-k3s-images` in this repo.\n\n### linkerd/dev/ctions/setup-tools\n\nThe `linkerd/dev/actions/setup-tools` action unpacks the `tools` container so\nthat its binaries and configuration is available to subsequent steps in the job.\n\n```yaml\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: linkerd/dev/actions/setup-tools@v43\n      - uses: actions/checkout@v3\n      - run: just-sh lint\n      - run: just-dev lint-actions\n      - run: just-dev check-action-images\n```\n\n## Go\n\nThe `go` container provides a Go toolchain (linters and other Go tooling are\nincluded with the Tools image). The container can be used as a base image when\nbuilding via docker.\n\n### Go in GitHub Actions\n\n```yaml\njobs:\n  test:\n    runs-on: ubuntu-latest\n    container: ghcr.io/linkerd/dev:v43-go\n    steps:\n      - uses: actions/checkout@v3\n      - run: go mod download\n      - run: go test ./...\n```\n\n#### linkerd/dev/actions/setup-go\n\nThe `linkerd/dev/actions/setup-go` action configures the job to use the\ndefault go version.\n\nLinting and testing tooling must be setup via `linkerd/dev/actions/setup-tools`.\n\n```yaml\njobs:\n  test:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        k8s:\n          - v1.21\n          - v1.26\n    steps:\n      # Install just* tooling and Go linters\n      - uses: linkerd/dev/actions/setup-tools@v43\n      # Configure the default Go toolchain\n      - uses: linkerd/dev/actions/setup-go@v43\n      - uses: actions/checkout@v3\n      - run: just-k3d K3S_CHANNEL=${{ matrix.k8s }} create\n      - run: go mod download\n      - run: go test ./...\n```\n\n## Rust\n\nThe `rust` container provides a Rust toolchain and associated utilities needed\nto build and test Rust code. The `rust-musl` container provides the same\ntoolchain, but with the `musl` target installed with cross-compilation support\nfor arm64 and armv7.\n\n### Rust in GitHub Actions\n\nThese containers can be used in a workflow like so:\n\n```yaml\njobs:\n  test:\n    runs-on: ubuntu-latest\n    container: ghcr.io/linkerd/dev:v43-rust\n    steps:\n      - uses: actions/checkout@v3\n      - run: just-cargo fetch\n      - run: just-cargo test-build\n      - run: just-cargo test\n```\n\nOr, to build a static binary:\n\n```yaml\njobs:\n  test:\n    runs-on: ubuntu-latest\n    container: ghcr.io/linkerd/dev:v43-rust-musl\n    steps:\n      - uses: actions/checkout@v3\n      - run: just-cargo fetch\n      - run: just-cargo build\n```\n\nBuild failures are automatically reported as annotations in the GitHub UI.\n\n#### linkerd/dev/actions/setup-rust\n\nThe above example is fine when we're just building software, but when we want to\nstart networked services in Docker (namely, k3d clusters), the containerized\napproach no longer works.\n\n```yaml\njobs:\n  test:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        k8s:\n          - v1.21\n          - v1.25\n    env:\n      K3S_CHANNEL: ${{ matrix.k8s }}\n    steps:\n      # Install just* tooling\n      - uses: linkerd/dev/actions/setup-tools@v43\n      # Configure the default Rust toolchain\n      - uses: linkerd/dev/actions/setup-rust@v43\n      - run: just-k3d create\n      - run: just-cargo fetch\n      - run: just-cargo test-build\n      - run: just-cargo test\n```\n\n## Building\n\nBuild a single target (e.g. while editing the Dockerfile):\n\n```sh\n:; just targets=rust build\n```\n\nUpdate k3s images for all channels:\n\n```sh\n:; just sync-k3s-images\n```\n\nPush all images:\n\n```sh\n:; just push=true version=vNN build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkerd%2Fdev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkerd%2Fdev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkerd%2Fdev/lists"}