-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Problem
Generating ConfigMaps and Secrets with structured content requires building files as @concat strings with manually escaped quotes and \n:
stringData:
config.yaml:
"@concat":
- "server_name: \""
- "$.Source.spec.name"
- "\"\n"
- "database:\n"
- " host: \""
- "$.Source.spec.dbHost"
- "\"\n"This is error-prone, unreadable, and unmaintainable. Any operator managing applications needs config generation, and @concat doesn't scale for it.
Proposal
@toJson and @toYaml operators that serialize a structured object (with embedded expressions) to a string:
stringData:
config.yaml:
"@toYaml":
server_name: "$.Source.spec.name"
database:
host: "$.Source.spec.dbHost"
port: "$.Source.spec.dbPort"- Recursively evaluate expressions, then serialize
- Nested operators (
@concat,@cond,@definedOr) work inside - Output is a string for ConfigMap/Secret values
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels