Conversation
Switch the clustered mode Alloy deployment from the official Grafana Alloy container image to the CloudZero Alloy fork. The CloudZero Alloy binary is embedded directly in the agent Docker image, so the Alloy container now uses the same image as all other agent containers rather than pulling a separate image. Functional Change: Before: Clustered mode pulled and ran Alloy from a separate container image (docker.io/grafana/alloy:v1.11.3). After: Clustered mode runs the CloudZero Alloy binary embedded in the agent image. The Alloy container uses the agent image with /app/cloudzero-alloy as the default command. Users can override both the image and command via clusteredNode.image and clusteredNode.command to use a different Alloy image (e.g., the official Grafana Alloy). Solution: 1. Added a new Dockerfile stage that pulls from the CloudZero Alloy image (ghcr.io/evan-cz/alloy) and copies /bin/cloudzero-alloy into /app/ in the final image. 2. Updated the Alloy container in helm/templates/agent-deploy.yaml to use the agent image (components.agent.image) by default, with clusteredNode.image as an override layer via the compat parameter of generateImage. 3. Added a generateContainerCommand helper to _helpers.tpl with three-state logic: null uses the default command (/app/cloudzero-alloy), an empty array uses the image's default entrypoint, and a non-empty array uses the specified command. 4. Changed clusteredNode.image defaults in helm/values.yaml from docker.io/grafana/alloy:v1.11.3 to null/null so they fall back to components.agent.image. Added clusteredNode.command (default null). Updated values.schema.yaml accordingly. 5. Updated Helm tests (alloy_deployment_test.yaml, alloy_image_configuration_test.yaml) to validate the new image source and command configuration. Validation: - All 481 Helm unit tests pass across 64 test suites - Docker image built and pushed successfully for both linux/amd64 and linux/arm64 via `make package-debug` - Deployed to GKE cluster with `mode: clustered`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switch the clustered mode Alloy deployment from the official Grafana Alloy container image to the CloudZero Alloy fork. The CloudZero Alloy binary is embedded directly in the agent Docker image, so the Alloy container now uses the same image as all other agent containers rather than pulling a separate image.
Functional Change:
Before: Clustered mode pulled and ran Alloy from a separate container image (docker.io/grafana/alloy:v1.11.3).
After: Clustered mode runs the CloudZero Alloy binary embedded in the agent image. The Alloy container uses the agent image with /app/cloudzero-alloy as the default command. Users can override both the image and command via clusteredNode.image and clusteredNode.command to use a different Alloy image (e.g., the official Grafana Alloy).
Solution:
Added a new Dockerfile stage that pulls from the CloudZero Alloy image (ghcr.io/evan-cz/alloy) and copies /bin/cloudzero-alloy into /app/ in the final image.
Updated the Alloy container in helm/templates/agent-deploy.yaml to use the agent image (components.agent.image) by default, with clusteredNode.image as an override layer via the compat parameter of generateImage.
Added a generateContainerCommand helper to _helpers.tpl with three-state logic: null uses the default command (/app/cloudzero-alloy), an empty array uses the image's default entrypoint, and a non-empty array uses the specified command.
Changed clusteredNode.image defaults in helm/values.yaml from docker.io/grafana/alloy:v1.11.3 to null/null so they fall back to components.agent.image. Added clusteredNode.command (default null). Updated values.schema.yaml accordingly.
Updated Helm tests (alloy_deployment_test.yaml, alloy_image_configuration_test.yaml) to validate the new image source and command configuration.
Validation:
make package-debugmode: clustered