Skip to content

Commit 07159e0

Browse files
committed
feat: Adds helm config to Agent Environment
1 parent a208510 commit 07159e0

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

src/agentex/lib/cli/handlers/deploy_handlers.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,23 @@ def check_helm_installed() -> bool:
4646
return False
4747

4848

49-
def add_helm_repo() -> None:
49+
def add_helm_repo(helm_repository_name: str, helm_repository_url: str) -> None:
5050
"""Add the agentex helm repository if not already added"""
5151
try:
5252
# Check if repo already exists
5353
result = subprocess.run(
5454
["helm", "repo", "list"], capture_output=True, text=True, check=True
5555
)
5656

57-
if "scale-egp" not in result.stdout:
57+
if helm_repository_name not in result.stdout:
5858
console.print("Adding agentex helm repository...")
5959
subprocess.run(
6060
[
6161
"helm",
6262
"repo",
6363
"add",
64-
"scale-egp",
65-
"https://scale-egp-helm-charts-us-west-2.s3.amazonaws.com/charts",
64+
helm_repository_name,
65+
helm_repository_url,
6666
],
6767
check=True,
6868
)
@@ -318,8 +318,14 @@ def deploy_agent(
318318
else:
319319
console.print(f"[yellow]⚠[/yellow] No environments.yaml found, skipping environment-specific config")
320320

321+
if agent_env_config:
322+
helm_repository_name = agent_env_config.helm_repository_name
323+
helm_repository_url = agent_env_config.helm_repository_url
324+
else:
325+
helm_repository_name = "scale-egp"
326+
helm_repository_url = "https://scale-egp-helm-charts-us-west-2.s3.amazonaws.com/charts"
321327
# Add helm repository/update
322-
add_helm_repo()
328+
add_helm_repo(helm_repository_name, helm_repository_url)
323329

324330
# Merge configurations
325331
helm_values = merge_deployment_configs(manifest, agent_env_config, deploy_overrides, manifest_path)
@@ -349,7 +355,7 @@ def deploy_agent(
349355
"helm",
350356
"upgrade",
351357
release_name,
352-
"scale-egp/agentex-agent",
358+
f"{helm_repository_name}/agentex-agent",
353359
"--version",
354360
AGENTEX_AGENTS_HELM_CHART_VERSION,
355361
"-f",
@@ -371,7 +377,7 @@ def deploy_agent(
371377
"helm",
372378
"install",
373379
release_name,
374-
"scale-egp/agentex-agent",
380+
f"{helm_repository_name}/agentex-agent",
375381
"--version",
376382
AGENTEX_AGENTS_HELM_CHART_VERSION,
377383
"-f",

src/agentex/lib/sdk/config/environment_config.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ class AgentEnvironmentConfig(BaseModel):
7373
...,
7474
description="Authentication and authorization configuration"
7575
)
76+
helm_repository_name: str = Field(
77+
default="scale-egp",
78+
description="Helm base repository for the environment"
79+
)
80+
helm_repository_url: str = Field(
81+
default="https://scale-egp-helm-charts-us-west-2.s3.amazonaws.com/charts",
82+
description="Helm repository url for the environment"
83+
)
7684
helm_overrides: Dict[str, Any] = Field(
7785
default_factory=dict,
7886
description="Helm chart value overrides for environment-specific tuning"

0 commit comments

Comments
 (0)