Skip to content

Proactive restart demo script uses hardcoded operator namespace and deployment name #223

@Schimuneck

Description

@Schimuneck

Problem

The proactive restart demo script (demos/agentcard-proactive-restart/run-demo-commands.sh) defaults to:

  • OPERATOR_NS=agentcard-system
  • OPERATOR_DEPLOY=agentcard-operator
  • SPIRE_TRUST_DOMAIN=demo.example.com

These don't match a standard Helm-based deployment, which uses kagenti-system and kagenti-controller-manager. The script's patch_operator_grace function also replaces all container args with a hardcoded list (including --leader-elect=false and --metrics-bind-address=0), which differs from the Helm-deployed args structure.

Impact

Anyone following the demo docs after a Helm install will hit failures without knowing to override the env vars. The arg replacement can also break the operator by removing Helm-configured flags.

Suggested fix

  1. Update defaults to match the Helm chart conventions (kagenti-system, kagenti-controller-manager)
  2. Instead of replacing all args, patch only the --svid-expiry-grace-period flag in the existing args list
  3. Auto-detect the trust domain from the operator's current args if not explicitly set

Reproduction

# After Helm-based install:
helm install kagenti-operator charts/kagenti-operator -n kagenti-system --create-namespace

# Running the demo script fails:
./demos/agentcard-proactive-restart/run-demo-commands.sh
# Error: deployment "agentcard-operator" not found in namespace "agentcard-system"

Workaround

Run with overrides and patch the grace period manually:

OPERATOR_NS=kagenti-system \
OPERATOR_DEPLOY=kagenti-controller-manager \
SPIRE_TRUST_DOMAIN=example.org \
./demos/agentcard-proactive-restart/run-demo-commands.sh

Even with overrides, the patch_operator_grace function clobbers all args. A manual approach that patches only the grace period flag works correctly.

Found during

E2E walkthrough of all 4 AgentCard demo scenarios on a Kind cluster with Helm-deployed operator.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions