Skip to content

Conversation

@smoreinis
Copy link
Contributor

Summary

This PR adds support for deploying agents using OCI-based Helm registries (such as Google Artifact Registry) as an alternative to classic Helm repositories.

Key Changes

  • New environment config fields: Added helm_oci_registry and helm_chart_version to AgentEnvironmentConfig for configuring OCI-based deployments
  • Auto-authentication: Implemented automatic login to Google Artifact Registry using gcloud auth print-access-token
  • Latest chart version fetching: Added --use-latest-chart CLI flag that queries GAR for the most recent chart tag
  • Dual-mode support: The deploy command now intelligently switches between classic Helm repo mode and OCI registry mode based on environment configuration

Usage

OCI mode (new) - Set helm_oci_registry in your environment config:

environments:
  production:
    helm_oci_registry: "us-west1-docker.pkg.dev/my-project/helm-charts"
    helm_chart_version: "0.2.0"  # optional, defaults to CLI default

Fetch latest chart version:

agentex agents deploy --manifest manifest.yaml --use-latest-chart

Classic mode (unchanged) - Continue using helm_repository_name and helm_repository_url as before.

Test plan

  • Test deployment with OCI registry configuration
  • Test --use-latest-chart flag fetches correct version from GAR
  • Verify classic Helm repo mode still works unchanged
  • Test error handling when gcloud is not installed or authenticated

Add support for deploying agents using OCI-based Helm registries (e.g., Google Artifact Registry) as an alternative to classic Helm repositories.

Changes:
- Add `helm_oci_registry` and `helm_chart_version` fields to AgentEnvironmentConfig
- Implement auto-login to Google Artifact Registry using gcloud credentials
- Add `--use-latest-chart` CLI flag to fetch the latest chart version from OCI registry
- Support both classic Helm repo mode and OCI registry mode based on environment config
@smoreinis smoreinis requested a review from RoxyFarhad February 3, 2026 23:49


def get_chart_reference(
use_oci: bool,
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need this use_oi ? isn't this implicitly true if oci_registry is not true?

helm_repository_name = agent_env_config.helm_repository_name
helm_repository_url = agent_env_config.helm_repository_url
# Determine if using OCI or classic helm repo mode
use_oci = agent_env_config.uses_oci_registry() if agent_env_config else False
Copy link
Collaborator

@RoxyFarhad RoxyFarhad Feb 4, 2026

Choose a reason for hiding this comment

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

can you make this a helper function that returns chart_reference, chart_version just so its clear that it is always set? Feel like that gets kind of lost here and can cause helm deploy issues

description="Helm repository url for the environment",
description="Helm repository url for the environment (classic mode)"
)
helm_oci_registry: str | None = Field(
Copy link
Collaborator

Choose a reason for hiding this comment

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

what about making an oci_registry map and then having these as nested values? just so it looks more like an optional config?

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.

2 participants