Skip to content

context update

Kadyapam edited this page May 28, 2026 · 1 revision

noetl context update

Patch an existing context's settings in place.

noetl context update <name> [flags]

Every flag is optional. Fields you don't pass are preserved. The command refuses if the context doesn't exist — use noetl context add or noetl context init --from-gateway to create one.

Available since noetl v2.15.0 (PR #13).

Why this exists

Before context update, the only way to change a single field (e.g. paste in a new auth0_client_id after rotating an Auth0 application) was to noetl context delete followed by noetl context add with every field re-typed. That dropped the cached gateway_session_token (forcing a fresh login) and was easy to get wrong.

context update patches in place. It does not touch the cached session token.

Updatable fields

Flag Effect
--server-url=<url> New base URL.
--runtime=<mode> New default runtime: local, distributed, or auto.
--auth0-domain=<domain> New Auth0 tenant domain. Empty string clears.
--auth0-client-id=<id> New Auth0 client_id. Empty string clears.
--auth0-redirect-uri=<url> New Auth0 callback URL. Empty string clears.
--auth0-audience=<aud> New audience. Empty string clears.
--auth0-client-secret=<secret> New client_secret. Empty string clears.
--kube-context=<name> New Kubernetes context. Empty string clears.
--kube-namespace=<ns> New namespace. Empty string clears.
--kube-service=<name> New service name. Empty string clears (defaults back to noetl).
--kube-remote-port=<port> New in-cluster service port. 0 clears (defaults back to 8082).

Clearing semantics

For string fields, passing an empty string (--auth0-audience="") clears the value. For --kube-remote-port, passing 0 clears it back to the default of 8082. To preserve a value, simply omit the flag.

What is not touched

  • gateway_session_token — keeping the cached login. If you need a fresh token, run noetl auth login after the update.

Examples

# Rotate the Auth0 application client_id without losing the cached session
noetl context update prod --auth0-client-id=NewClientIdAfterRotation

# Repoint a port-forward context at a different local port
noetl context update gke-pf --server-url=http://127.0.0.1:18083

# Add kube fields to an existing context so port-forward will work
noetl context update gke-prod \
  --kube-context=gke_acme_us-central1_prod \
  --kube-namespace=noetl

# Switch a context to local runtime mode
noetl context update local-dev --runtime=local

# Clear the audience field that was set by mistake
noetl context update prod --auth0-audience=""

# Clear the Kubernetes context entirely (disables port-forward for it)
noetl context update prod --kube-context=""

Errors

$ noetl context update nope --auth0-client-id=foo
Context 'nope' not found.  Create it first:
  noetl context add nope --server-url=...
  # or
  noetl context init nope --from-gateway https://gateway.example.com

See also

Clone this wiki locally