I have the following yaml which I want to replace the command field
Have
apiVersion: batch/v1
kind: Job
metadata:
name: test004
spec:
template:
spec:
containers:
- name: "eee"
image: "test"
command: ["a", "b", "c"]
want
apiVersion: batch/v1
kind: Job
metadata:
name: test004
spec:
template:
spec:
containers:
- name: "eee"
image: "test"
command: ["a", "b", "c", "d"]
yq -i n --style myfile.yaml 'spec.template.spec.containers[0].command' "["a", "b", "c","d"]"
is there a way to achive this with yq
, I try with style without success, If I change it to simple string it works, but not when I want to pass full array, any idea ?