Skip to content

Commit b43de96

Browse files
coderabbit review fixes
Signed-off-by: Ankit Kr. Chowdhury <rakesh856100@gmail.com>
1 parent a778207 commit b43de96

4 files changed

Lines changed: 22 additions & 4 deletions

File tree

.agents/skills/agentrax-context/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ description: Project context and settled architecture decisions for the Agentrax
2121
- **Autoscaling**: native `HorizontalPodAutoscaler` pointed at Prometheus Adapter custom metrics (`queueDepth` or `gpuUtilization`). No custom scaling loop. During active canary, the stable HPA is paused (deleted) and no canary HPA is created — autoscaling resumes only after promotion or rollback.
2222
- **Traffic splitting**: Gateway API `HTTPRoute` weighted backends. Not Istio, not ingress annotations.
2323
- **Network Isolation**: Two-tier Kubernetes `NetworkPolicy` (`allow-metrics-traffic` in `agentrax-system` allowing operator metrics on TCP 8443; `tenant-agent-isolation` rendered into every `tenant-*` namespace selecting agent pods with `agentrax.io/agent: "true"` for scraping on TCP 8080 and egress to API server/CoreDNS in `kube-system`). No service mesh.
24-
- **Cloud Workload Identity**: No static cloud credentials ever. Azure deployments use AKS Workload Identity (`azure.workload.identity/client-id` + `/tenant-id` ServiceAccount annotations; `azure.workload.identity/use: "true"` pod label). AWS deployments use IRSA (`eks.amazonaws.com/role-arn` annotation). Both are opt-in via `workloadIdentity.enabled` in `charts/agentrax/values.yaml`; disabled by default for on-premises portability.
24+
- **Cloud Workload Identity**: No static cloud credentials ever. Azure deployments use AKS Workload Identity (`azure.workload.identity/client-id` + `/tenant-id` ServiceAccount annotations; `azure.workload.identity/use: "true"` pod label). AWS deployments use IRSA (`eks.amazonaws.com/role-arn` annotation). In Helm deployments, both are opt-in via `workloadIdentity.enabled` in `charts/agentrax/values.yaml` (disabled by default for portability); in Kustomize deployments, AWS IRSA is activated via the `config/workload-identity/irsa-serviceaccount.yaml` strategic-merge patch.
2525
- **MCP registry**: embedded HTTP handler inside the operator process, backed by a `ConfigMap`. Not a separate Deployment, not a new database — HA storage is a v2 item.
2626
- **Non-goals**: no model training/fine-tuning, no general-purpose workload management, no service mesh, no UI in v1. Flag any drift toward these rather than quietly implementing them.
2727

charts/agentrax/templates/serviceaccount.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
{{- if .Values.workloadIdentity.enabled }}
2+
{{- if not .Values.serviceAccount.create }}
3+
{{- fail "workloadIdentity.enabled requires serviceAccount.create to be true so the required cloud identity annotations can be attached" }}
4+
{{- end }}
5+
{{- if not (has .Values.workloadIdentity.provider (list "azure" "aws")) }}
6+
{{- fail (printf "workloadIdentity.provider must be either 'azure' or 'aws', got '%s'" .Values.workloadIdentity.provider) }}
7+
{{- end }}
8+
{{- if eq .Values.workloadIdentity.provider "azure" }}
9+
{{- if or (not .Values.workloadIdentity.azureClientId) (not .Values.workloadIdentity.azureTenantId) }}
10+
{{- fail "workloadIdentity.azureClientId and workloadIdentity.azureTenantId must be non-empty when provider is 'azure'" }}
11+
{{- end }}
12+
{{- end }}
13+
{{- if eq .Values.workloadIdentity.provider "aws" }}
14+
{{- if not .Values.workloadIdentity.awsRoleArn }}
15+
{{- fail "workloadIdentity.awsRoleArn must be non-empty when provider is 'aws'" }}
16+
{{- end }}
17+
{{- end }}
18+
{{- end }}
119
{{- if .Values.serviceAccount.create -}}
220
apiVersion: v1
321
kind: ServiceAccount

config/workload-identity/irsa-serviceaccount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
apiVersion: v1
2626
kind: ServiceAccount
2727
metadata:
28-
name: agentrax-controller-manager # must match the name rendered by the Helm chart
28+
name: agentrax-controller-manager # Kustomize ServiceAccount name (Helm chart uses "agentrax" by default via workloadIdentity.awsRoleArn)
2929
namespace: agentrax-system
3030
annotations:
3131
# Replace this placeholder with the actual IAM role ARN before applying.

docs/ARCHITECTURE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ Agentrax maintains a **two-tier network policy model**:
340340

341341
### 4.7 Keyless Cloud IAM — Workload Identity
342342

343-
Agentrax requires cloud API access (e.g., Azure Container Registry pulls, AWS Secrets Manager reads) in production. Static credentials baked into `Secret` objects rotate manually, are visible in etcd, and create a long-lived blast radius if leaked.
343+
Agentrax and managed agent pods often require cloud API access (e.g., Azure Key Vault, Azure OpenAI, AWS Secrets Manager) in production. Note that private container image pulls (such as ACR) are handled independently at the node layer via AKS Kubelet Managed Identity (with the `AcrPull` role) or Kubernetes `imagePullSecrets`, while Workload Identity specifically covers runtime cloud SDK calls originating from running pods.
344344

345-
The operator is instead bound to a cloud-managed identity at the pod level:
345+
Static credentials baked into `Secret` objects rotate manually, are visible in etcd, and create a long-lived blast radius if leaked. The operator and tenant agents are instead bound to a cloud-managed identity at the pod level:
346346

347347
| Cloud | Mechanism | How it works |
348348
| :------ | :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------- |

0 commit comments

Comments
 (0)