Skip to content

How to merge specific doc in the file #1496

Answered by mikefarah
mkruliv asked this question in Q&A
Discussion options

You must be logged in to vote

Simplest command is something like:

yq -i 'select(di==4) *= load("folder/app_deploy.yaml")' folder/app.yaml

or if you want to find by kind, it will be something like:

yq -i 'select(.kind == "Deployment") *= load("folder/app_deploy.yaml")' folder/app.yaml

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by mkruliv
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #1492 on January 01, 2023 23:06.