Skip to content

get-env fixes - #205

Merged
scott-cotton merged 3 commits into
mainfrom
get-env-map-keys-warnings
Sep 3, 2025
Merged

scott-cotton merged 3 commits into
mainfrom
get-env-map-keys-warnings

Conversation

@scott-cotton

Copy link
Copy Markdown
Member

Fixes signadot/community#102

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

25-08-26 scott@air cli % ./signadot sb get-env local-env
WARNING unsupported field ref: status.podIPs
export SIGNADOT_BASELINE_KIND='Deployment'              # constant
export SIGNADOT_BASELINE_NAMESPACE='hotrod-devmesh'     # fieldRef: metadata.namespace
export XYZ='v123'                                       # fieldRef: metadata.labels['e2e.signadot.com/version']
export SIGNADOT_BASELINE_NAME='location'                # constant
export OTEL_EXPORTER_OTLP_ENDPOINT='http://jaeger:4318' # constant
export MYSQL_HOST='mysql'                               # constant
export MYSQL_PORT='3306'                                # constant
export MYSQL_PASS='abc'                                 # constant
export SIGNADOT_SANDBOX_NAME='local-env'                # constant (override)
export SIGNADOT_SANDBOX_ROUTING_KEY='7yl13nt3n0nkb'     # constant (override)
25-08-26 scott@air cli % eval $(./signadot sb get-env local-env )
WARNING unsupported field ref: status.podIPs

@davixcky davixcky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, modulo the one question i left

Comment thread internal/command/sandbox/get_utils.go Outdated
return nil
}
for _, warning := range warnings {
_, err := fmt.Fprintf(out, "WARNING %s\n", warning)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't be WARNING: %s notice the colon after the warning, just trying to make it similar as the forbidden one

@daniel-de-vera daniel-de-vera left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scott-cotton
scott-cotton merged commit 6a0249b into main Sep 3, 2025
@scott-cotton
scott-cotton deleted the get-env-map-keys-warnings branch September 3, 2025 07:24
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.

[bug] signadot sb get-env and signadot sb get-files do not parse fieldRefs with nested keys correctly.

3 participants