Skip to content

Conversation

davixcky
Copy link
Contributor

@davixcky davixcky commented Aug 13, 2025

This fixes an issue that modify the order of the vars when applying the constraints (only noticeable when adding more constraints, for example OTHER_VAR)

SIGNADOT_SANDBOX_NAME local-hotrod-frontend-dep
SIGNADOT_SANDBOX_ROUTING_KEY 1zhhm5t7bk9pl
OTHER_VAR $(SIGNADOT_SANDBOX_NAMESPACE)_$(SIGNADOT_SANDBOX_NAME)
SIGNADOT_SANDBOX_NAMESPACE rk-$(SIGNADOT_SANDBOX_ROUTING_KEY)

When was defined as

SIGNADOT_SANDBOX_NAME local-hotrod-frontend-dep
SIGNADOT_SANDBOX_ROUTING_KEY 1zhhm5t7bk9pl
SIGNADOT_SANDBOX_NAMESPACE rk-$(SIGNADOT_SANDBOX_ROUTING_KEY)
OTHER_VAR $(SIGNADOT_SANDBOX_NAMESPACE)_$(SIGNADOT_SANDBOX_NAME)

It also add the support to resolve the env by calling the internal method in libconnect

Before

$ ./signadot sb get-env local-hotrod-frontend-dep
export SIGNADOT_BASELINE_KIND="Deployment"                                             # constant
export SIGNADOT_BASELINE_NAMESPACE="hotrod-2"                                          # fieldRef: metadata.namespace
export SIGNADOT_BASELINE_NAME="frontend"                                               # constant
export LOCATION_ADDR="location.$(SIGNADOT_BASELINE_NAMESPACE):8081"                    # constant
export REDIS_ADDR="redis.$(SIGNADOT_BASELINE_NAMESPACE):6379"                          # constant
export KAFKA_BROKER_ADDR="kafka-headless.$(SIGNADOT_BASELINE_NAMESPACE):9092"          # constant
export OTEL_EXPORTER_OTLP_ENDPOINT="http://jaeger.$(SIGNADOT_BASELINE_NAMESPACE):4318" # constant
export SIGNADOT_SANDBOX_NAME="local-hotrod-frontend-dep"                               # constant (override)
export SIGNADOT_SANDBOX_ROUTING_KEY="1zhhm5t7bk9pl"                                    # constant (override)

After

$ ./signadot sb get-env local-hotrod-frontend-dep
export SIGNADOT_BASELINE_KIND="Deployment"                       # constant
export SIGNADOT_BASELINE_NAMESPACE="hotrod-2"                    # fieldRef: metadata.namespace
export SIGNADOT_BASELINE_NAME="frontend"                         # constant
export LOCATION_ADDR="location.hotrod-2:8081"                    # constant
export REDIS_ADDR="redis.hotrod-2:6379"                          # constant
export KAFKA_BROKER_ADDR="kafka-headless.hotrod-2:9092"          # constant
export OTEL_EXPORTER_OTLP_ENDPOINT="http://jaeger.hotrod-2:4318" # constant
export SIGNADOT_SANDBOX_NAME="local-hotrod-frontend-dep"         # constant (override)
export SIGNADOT_SANDBOX_ROUTING_KEY="1zhhm5t7bk9pl"              # constant (override)

Copy link
Member

@scott-cotton scott-cotton left a comment

Choose a reason for hiding this comment

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

LGTM (still some work on the corresponding libconnect PR thought, and remember to update the go.mod/go.sum with go get and go mod tidy after the libconnect PR merges)

Copy link
Member

Choose a reason for hiding this comment

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

This file looks like an accidental addition?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, removed.

@davixcky davixcky merged commit 3dd7c22 into main Aug 14, 2025
@davixcky davixcky deleted the add-support-resolver-envs branch August 14, 2025 20:39
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