Skip to content

fallback value in -l flag if field does not exist #3245

Answered by hansbogert
hansbogert asked this question in Q&A
Discussion options

You must be logged in to vote

It starts making sense to translate cue export into cue transform in my head, we can just pre-process:

cue export yaml ... --out yaml schema.cue foo.yaml | cue import yaml: -l 'namespace' -

where schema.cue has:

metadata.namespace: *"_cluster"| string

It's a bit unwieldy but works.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@myitcv
Comment options

@hansbogert
Comment options

Answer selected by hansbogert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants