Hello,
I'm trying to modify some files that are later used by templates. I want to know if there is a possibility to insert values at the beginning instead of the end of the section:
Original file
spec:
containers:
- name: c
Command:
yq e ' .spec.volumeMounts.name = "data"' file.yml
Output
spec:
containers:
- name: c
volumeMounts:
name: data
Desired output
spec:
volumeMounts:
name: data
containers:
- name: c
I need it to be inserted at the beginning, so that if the template modifies it, I want it to ignore my entry.
Is there any way to achieve this?
Hello,
I'm trying to modify some files that are later used by templates. I want to know if there is a possibility to insert values at the beginning instead of the end of the section:
Original file
Command:
Output
Desired output
I need it to be inserted at the beginning, so that if the template modifies it, I want it to ignore my entry.
Is there any way to achieve this?