Skip to content

feat: support env strings config-wide - #1221

Merged
jranson merged 1 commit into
trickstercache:mainfrom
jranson:jr/envstrings
Oct 31, 2026
Merged

jranson merged 1 commit into
trickstercache:mainfrom
jranson:jr/envstrings

Conversation

@jranson

@jranson jranson commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Description

This expands environment var string replacement to all YAML values, rather than just specific values typed as EnvString. Instead of interpolating ${ENV_NAME} for EnvString fields during YAML unmarshaling, this change finds and interpolates all ${ENV_NAME} values across the config prior to the unmarshal step, while the EnvString and EnvStringMap types are retired.

The secret.Secret remains as a string type variant that returns <secret> from String(), and additional fields (e.g., redis credentials) are chnaged to Secret to prevent spilling in the sanitized config.

Because Request Rewriters use the ${1} or ${genericCaptureFieldname} formats for regex captures, that section requires env values to start with TRK_ (e.g,. ${TRK_REWRITER_FALLBACK_BACKEND}) to interpolate. The TRK_ prefix requirement does not apply to config sections outside of Request Rewriters.

Type of Change

    • Bug fix
    • New feature
    • Optimization
    • Test coverage
    • Documentation
    • Infrastructure

AI Disclosure

    • This contribution DOES NOT include AI-generated changes
    • This contribution DOES include AI-generated changes, and I have reviewed the relevant contributing guidelines.

Signed-off-by: James Ranson <james@ranson.org>
@jranson
jranson requested a review from a team as a code owner October 31, 2026 18:19
@jranson
jranson merged commit ce37d2f into trickstercache:main Oct 31, 2026
9 checks passed
@jranson
jranson deleted the jr/envstrings branch November 1, 2026 06:32
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