Skip to content

Conversation

@bussyjd
Copy link
Collaborator

@bussyjd bussyjd commented Nov 7, 2025

No description provided.

bussyjd and others added 4 commits November 7, 2025 16:40
Add support for securely providing the GOOGLE_API_KEY to the Obol Agent
via Kubernetes secrets instead of plaintext values in YAML.

Changes:
- Add --google-api-key flag (short: -g) to 'obol stack up' command
- Accept GOOGLE_API_KEY environment variable as alternative input
- Create 'agent' namespace and 'obol-agent-google-api-key' secret automatically
- Update obol-agent.yaml to consume secret via secretKeyRef
- Provide clear warnings when API key is not supplied

The implementation uses kubectl dry-run + apply pattern for idempotent
secret creation, matching the error handling style of existing code.

Usage:
  obol stack up --google-api-key="your-key"
  obol stack up -g "your-key"
  GOOGLE_API_KEY="your-key" obol stack up
Addresses review feedback to separate agent initialization from stack lifecycle.

Changes:
- Create new internal/agent package with Init() function for Google API key secret management
- Add 'obol agent init' command with --google-api-key flag (-g) and GOOGLE_API_KEY env var support
- Remove Google API key parameter from 'obol stack up' command
- Remove Google API key secret creation logic from syncDefaults in internal/stack/stack.go
- Update CLI help text to include new agent command section

Usage:
  obol stack up                              # Start stack (no API key needed)
  obol agent init --google-api-key="key"     # Initialize agent with API key
  obol agent init -g "key"                   # Short form
  GOOGLE_API_KEY="key" obol agent init       # Via environment variable

The agent init command requires the stack to be running and will create:
- agent namespace (if it doesn't exist)
- obol-agent-google-api-key secret in the agent namespace

This separation allows users to manage agent secrets independently of the
stack lifecycle, making it clearer when and how to provide sensitive credentials.
Add Google API key secret management for Obol Agent
namespace: agent

---
# Role for 'ethereum' namespace
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks duplicated, possibly my own fault given the relabelling of "l1" and "ethereum".

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.

3 participants