Skip to content

feat(QOV-1954): add --ephemeral flag with clone/debug modes to qovery shell#652

Merged
Guimove merged 5 commits into
mainfrom
feat/ephemeral-shell
Jun 8, 2026
Merged

feat(QOV-1954): add --ephemeral flag with clone/debug modes to qovery shell#652
Guimove merged 5 commits into
mainfrom
feat/ephemeral-shell

Conversation

@Guimove

@Guimove Guimove commented May 29, 2026

Copy link
Copy Markdown
Contributor

Jira: https://qovery.atlassian.net/browse/QOV-1954

Summary

  • Adds --ephemeral flag to qovery shell
  • Adds --mode flag (clone or debug) to control the ephemeral behavior
  • Adds --cpu and --memory flags to override resource limits on the clone pod
  • --mode clone (default): spawns a new isolated pod from the service image (Heroku-style, HIPAA-safe)
  • --mode debug: injects an ephemeral container into an existing running pod (kubectl-debug style, shares network/PID namespace)
  • Warning printed if --mode is set without --ephemeral

Usage

# Normal shell (existing behavior)
qovery shell

# Ephemeral shell -- clone mode (new isolated pod)
qovery shell --ephemeral --mode clone \
  --organization myorg --project myproject --environment myenv --service myservice

# With resource override -- useful for Rails migrations or any job needing more headroom
qovery shell --ephemeral --mode clone --memory 2Gi --cpu 1 \
  --organization myorg --project myproject --environment myenv --service myservice

# Debug mode (inject into existing pod)
qovery shell --ephemeral --mode debug \
  --organization myorg --project myproject --environment myenv --service myservice

# Custom command
qovery shell --ephemeral --mode clone --command python,manage.py,shell_plus \
  --organization myorg --project myproject --environment myenv --service myservice

# Via console URL
qovery shell --ephemeral --mode clone <qovery_console_service_url>

Depends on

rust-backend MR !635 must be merged and deployed first: https://gitlab.com/qovery/backend/rust-backend/-/merge_requests/635

Test plan

  • qovery shell (no flag) -- verify existing behavior unchanged
  • qovery shell --ephemeral --mode clone -- verify new pod spawns and is deleted on exit
  • qovery shell --ephemeral --mode clone -- pod deleted on Ctrl+C
  • qovery shell --ephemeral --mode clone --memory 2Gi -- verify pod starts with overridden memory
  • qovery shell --ephemeral --mode debug -- verify ephemeral container injected into existing pod
  • qovery shell --ephemeral --mode clone --command python,manage.py,shell_plus -- custom command
  • qovery shell --mode clone (without --ephemeral) -- verify warning printed, normal shell opened
  • Via console URL with --ephemeral --mode clone

Guimove added 3 commits May 29, 2026 07:35
…mage

When --ephemeral is passed, qovery shell creates a new temporary pod using
the service's image and env vars instead of connecting to an existing pod.
The pod is automatically deleted when the session ends.

Depends on: rust-backend feat/ephemeral-shell (new /shell/ephemeral endpoint)
@Guimove Guimove changed the title feat(shell): add --ephemeral flag to spawn a debug pod from service image feat(QOV-1954): add --ephemeral flag with clone/debug modes to qovery shell May 30, 2026
Resource overrides only apply to clone mode; debug injects a container
into an existing pod and ignores them. Warn instead of silently dropping.
@Guimove Guimove merged commit 234f395 into main Jun 8, 2026
6 checks passed
@Guimove Guimove deleted the feat/ephemeral-shell branch June 8, 2026 08:46
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