Skip to content

chore(docker): include grpcurl in provider image#405

Merged
troian merged 1 commit into
akash-network:mainfrom
neyy91:chore/include-grpcurl
Jul 23, 2026
Merged

chore(docker): include grpcurl in provider image#405
troian merged 1 commit into
akash-network:mainfrom
neyy91:chore/include-grpcurl

Conversation

@neyy91

@neyy91 neyy91 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolves akash-network/support#317.

The inventory operator exposes a gRPC API (akash.inventory.v1.ClusterRPC). Bundling grpcurl in the provider image makes it possible to probe that API from inside the container - for example, a liveness probe that restarts the pod when allocated resources exceed allocatable.

Change

grpcurl is not available via apt, so the Dockerfile installs a pinned release:

  • Pinned to v1.9.3.
  • Works for both amd64 and arm64 (the image is built for both), selecting the right asset via dpkg --print-architecture.
  • The downloaded tarball is sha256-verified against the published checksum before extraction.
  • Only the grpcurl binary is installed; the tarball is removed afterwards.
  • grpcurl -version runs at the end so the build fails fast if anything is wrong.

Testing

Built the image locally (amd64) and confirmed the install step downloads, passes the checksum check, extracts the binary, and grpcurl -version reports v1.9.3. The arm64 asset uses the official published checksum.

refs: akash-network/support#317

@neyy91
neyy91 requested a review from a team as a code owner June 17, 2026 16:18
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The release configuration now supplies a pinned grpcurl version and architecture-specific checksums to provider image builds. The Dockerfile selects the matching artifact, verifies its checksum, installs grpcurl into /usr/bin, and prints its version.

Changes

grpcurl installation in provider image

Layer / File(s) Summary
grpcurl build configuration wiring
.env, make/releasing.mk, .goreleaser*.yaml
Defines grpcurl version and per-architecture checksums, loads them for release targets, and passes them to both amd64 and arm64 Docker builds.
grpcurl download and verified installation
Dockerfile
Selects the architecture-specific release archive and checksum, downloads and verifies the archive, extracts grpcurl into /usr/bin, removes the temporary file, and prints grpcurl -version.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseConfig
  participant Dockerfile
  participant GitHubReleases
  ReleaseConfig->>Dockerfile: Pass version and architecture checksums
  Dockerfile->>GitHubReleases: Download matching grpcurl archive
  GitHubReleases-->>Dockerfile: Return release tarball
  Dockerfile->>Dockerfile: Verify checksum and install grpcurl
Loading

Suggested reviewers: cloud-j-luna

Poem

🐇 Hop, hop, the checksums flow,
Through release builds they neatly go.
The right grpcurl tool is found,
Verified before it’s passed around.
Into the image, safe and bright!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding grpcurl to the provider image.
Description check ✅ Passed The description is directly related to the Docker and release changes in this PR.
Linked Issues check ✅ Passed The changes satisfy #317 by bundling grpcurl into the provider image for in-container gRPC probing.
Out of Scope Changes check ✅ Passed The diff stays focused on grpcurl installation and related build configuration with no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
Dockerfile

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

.goreleaser-docker.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

.goreleaser.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
Dockerfile (1)

32-33: ⚡ Quick win

Harden the download step against transient network failures.

curl -fsSL can fail builds on temporary GitHub/DNS/network hiccups. Add retry and timeout flags to make image builds more reliable.

Suggested patch
-    curl -fsSL -o /tmp/grpcurl.tar.gz \
+    curl -fL --retry 5 --retry-delay 2 --retry-connrefused --connect-timeout 10 --max-time 120 -o /tmp/grpcurl.tar.gz \
       "https://github.com/fullstorydev/grpcurl/releases/download/v${GRPCURL_VERSION}/grpcurl_${GRPCURL_VERSION}_linux_${arch}.tar.gz"; \
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` around lines 32 - 33, The curl command used to download the
grpcurl tarball in the Dockerfile lacks resilience against transient network
failures. Add retry and timeout flags to the curl command that downloads grpcurl
to make the build process more robust. Specifically, add the `--retry` flag to
automatically retry failed downloads on transient failures, and add
timeout-related flags such as `--connect-timeout` and `--max-time` to prevent
indefinite hangs. These flags should be added to the curl command parameters
alongside the existing `-fsSL` flags in the grpcurl download step.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@Dockerfile`:
- Around line 32-33: The curl command used to download the grpcurl tarball in
the Dockerfile lacks resilience against transient network failures. Add retry
and timeout flags to the curl command that downloads grpcurl to make the build
process more robust. Specifically, add the `--retry` flag to automatically retry
failed downloads on transient failures, and add timeout-related flags such as
`--connect-timeout` and `--max-time` to prevent indefinite hangs. These flags
should be added to the curl command parameters alongside the existing `-fsSL`
flags in the grpcurl download step.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 758bb450-7cb4-47dc-a82a-384f5c185467

📥 Commits

Reviewing files that changed from the base of the PR and between 0e0fd8a and 3877d2b.

📒 Files selected for processing (1)
  • Dockerfile

chalabi2
chalabi2 previously approved these changes Jun 18, 2026

@chalabi2 chalabi2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment thread Dockerfile Outdated
Comment thread Dockerfile
Bundle grpcurl into the provider image so the inventory operator's gRPC
API can be probed from inside the container (e.g. a liveness probe).

grpcurl is not packaged in apt, so a pinned release is downloaded and
sha256-verified for both amd64 and arm64. The version and per-arch
checksums live in .env and are threaded through the goreleaser build as
--build-arg values, so bumping the release only touches .env, not the
Dockerfile. The download is hardened with curl retry/timeout flags.

Resolves akash-network/support#317

Co-authored-by: neyy <neyy91@mail.ru>
@Zblocker64
Zblocker64 force-pushed the chore/include-grpcurl branch from c091b63 to d121483 Compare July 22, 2026 14:48

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.env:
- Around line 5-10: Reorder the GRPCURL_VERSION, GRPCURL_SHA256_AMD64, and
GRPCURL_SHA256_ARM64 entries in .env to match dotenv-linter’s expected ordering
relative to KINDEST_VERSION, without changing their values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 928a5510-37db-4078-9897-4023443676d1

📥 Commits

Reviewing files that changed from the base of the PR and between ddf8b5d and d121483.

📒 Files selected for processing (5)
  • .env
  • .goreleaser-docker.yaml
  • .goreleaser.yaml
  • Dockerfile
  • make/releasing.mk

Comment thread .env
@troian
troian merged commit ea6fa4c into akash-network:main Jul 23, 2026
52 of 57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include grpcurl in Provider Image

4 participants