Yq 배열에 원소 추가

1 개요[ | ]

Yq 배열에 원소 추가
root@wsl:~# cat hello.yaml
kind: Hello
metadata:
  labels:
    hello: world
    version: 0.1.0
root@wsl:~# cat hello.yaml | yq '.metadata.labels += {"foo":1,"bar":2}'
kind: Hello
metadata:
  labels:
    hello: world
    version: 0.1.0
    foo: 1
    bar: 2

2 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}