Skip to content

Conversation

@scott-cotton
Copy link
Member

depends on https://github.com/signadot/libconnect/pull/149

26-01-19 scott@air cli % ./signadot sb get-env -h
Get environment from a (local) sandbox

Usage:
signadot sandbox get-env NAME [flags]

Flags:
-c, --container string container
-h, --help help for get-env
-l, --local string local workload name (default to first)
-s, --show-source show source in comments

Global Flags:
--config string config file (default is $HOME/.signadot/config.yaml)
--debug enable debug output
-o, --output string output format (json|yaml)
26-01-19 scott@air cli % unset MYSQL_ADDR
26-01-19 scott@air cli % eval $(./signadot sb get-env local-env)
26-01-19 scott@air cli % echo $MYSQL_ADDR
mysql.:3306
26-01-19 scott@air cli % ./signadot sb get-env local-env
export SIGNADOT_BASELINE_KIND='Deployment'
export SIGNADOT_BASELINE_NAMESPACE='hotrod-istio'
export SIGNADOT_BASELINE_NAME='location'
export MYSQL_ADDR='mysql.:3306'
export MYSQL_PASS='abc'
export REDIS_ADDR='redis.:6379'
export OTEL_EXPORTER_OTLP_ENDPOINT='http://jaeger.:4318'
export SIGNADOT_SANDBOX_NAME='local-env'
export SIGNADOT_SANDBOX_ROUTING_KEY='kmffhhn1kvvly'
26-01-19 scott@air cli % ./signadot sb get-env local-env -s
export SIGNADOT_BASELINE_KIND='Deployment' # constant
export SIGNADOT_BASELINE_NAMESPACE='hotrod-istio' # fieldRef: metadata.namespace
export SIGNADOT_BASELINE_NAME='location' # constant
export MYSQL_ADDR='mysql.:3306' # constant
export MYSQL_PASS='abc' # constant
export REDIS_ADDR='redis.:6379' # constant
export OTEL_EXPORTER_OTLP_ENDPOINT='http://jaeger.:4318' # constant
export SIGNADOT_SANDBOX_NAME='local-env' # constant (override)
export SIGNADOT_SANDBOX_ROUTING_KEY='kmffhhn1kvvly' # constant (override)
26-01-19 scott@air cli %

26-01-19 scott@air cli % ./signadot sb get-env -h
Get environment from a (local) sandbox

Usage:
  signadot sandbox get-env NAME [flags]

Flags:
  -c, --container string   container
  -h, --help               help for get-env
  -l, --local string       local workload name (default to first)
  -s, --show-source        show source in comments

Global Flags:
      --config string   config file (default is $HOME/.signadot/config.yaml)
      --debug           enable debug output
  -o, --output string   output format (json|yaml)
26-01-19 scott@air cli % unset MYSQL_ADDR
26-01-19 scott@air cli % eval $(./signadot sb get-env local-env)
26-01-19 scott@air cli % echo $MYSQL_ADDR
mysql.<NAMESPACE>:3306
26-01-19 scott@air cli % ./signadot sb get-env local-env
export SIGNADOT_BASELINE_KIND='Deployment'
export SIGNADOT_BASELINE_NAMESPACE='hotrod-istio'
export SIGNADOT_BASELINE_NAME='location'
export MYSQL_ADDR='mysql.<NAMESPACE>:3306'
export MYSQL_PASS='abc'
export REDIS_ADDR='redis.<NAMESPACE>:6379'
export OTEL_EXPORTER_OTLP_ENDPOINT='http://jaeger.<NAMESPACE>:4318'
export SIGNADOT_SANDBOX_NAME='local-env'
export SIGNADOT_SANDBOX_ROUTING_KEY='kmffhhn1kvvly'
26-01-19 scott@air cli % ./signadot sb get-env local-env -s
export SIGNADOT_BASELINE_KIND='Deployment'                          # constant
export SIGNADOT_BASELINE_NAMESPACE='hotrod-istio'                   # fieldRef: metadata.namespace
export SIGNADOT_BASELINE_NAME='location'                            # constant
export MYSQL_ADDR='mysql.<NAMESPACE>:3306'                          # constant
export MYSQL_PASS='abc'                                             # constant
export REDIS_ADDR='redis.<NAMESPACE>:6379'                          # constant
export OTEL_EXPORTER_OTLP_ENDPOINT='http://jaeger.<NAMESPACE>:4318' # constant
export SIGNADOT_SANDBOX_NAME='local-env'                            # constant (override)
export SIGNADOT_SANDBOX_ROUTING_KEY='kmffhhn1kvvly'                 # constant (override)
26-01-19 scott@air cli %
scott-cotton and others added 2 commits January 28, 2026 01:26
- Run gofmt on 6 files with formatting issues
- Fix fmt.Errorf format in sdk.go: dereference *string for %q
- Update sandbox_subst_test.go to include middleware field

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Make the help text consistent across both commands and clarify what
the defaults refer to.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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