-
Notifications
You must be signed in to change notification settings - Fork 0
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).
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.
| 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). |
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.
-
gateway_session_token— keeping the cached login. If you need a fresh token, runnoetl auth loginafter the update.
# 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=""$ 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
-
noetl context add— create a context. -
noetl context init --from-gateway— bootstrap a context from a gateway URL, then useupdateto fill in kube fields. -
noetl context port-forward— uses thekube_*fields this command sets.
NoETL CLI
Contexts
- Context model
context addcontext init --from-gatewaycontext updatecontext port-forwardcontext list / use / current / delete
Auth
Architecture
Cross-wiki