GoodMem
ReferenceCLI

System Drain

System Drain CLI command reference

goodmem system drain

Initiate a server drain

Synopsis

Request that the GoodMem server enter drain mode. Draining flips readiness to NOT_SERVING and waits for in-flight work to finish.

goodmem system drain [flags]

Examples

  # Begin draining with default timeout
  goodmem system drain

  # Drain with a custom reason and wait for completion
  goodmem system drain --reason deploy --wait --timeout 600

  # Trigger drain and emit JSON
  goodmem system drain --output json

Options

  -h, --help            help for drain
      --output string   Output format: text or json (default "text")
      --reason string   Optional reason recorded in the server logs
      --timeout int     Maximum seconds to wait when --wait is specified (0 to use server default) (default 900)
      --wait            Block until the server reaches the quiesced state

Options inherited from parent commands

      --api-key string   API key for authentication (can also be set via GOODMEM_API_KEY environment variable)
      --server string    GoodMem server address (gRPC API) (default "https://localhost:9090")

SEE ALSO