-
-
Notifications
You must be signed in to change notification settings - Fork 728
Closed
Description
My goal is to read/write the image in the following k8s YAML
kind: Deployment
apiVersion: apps/v1
metadata:
namespace: default
name: whoami
labels:
app: whoami
spec:
replicas: 1
selector:
matchLabels:
app: whoami
template:
metadata:
labels:
app: whoami
spec:
containers:
- name: whoami-container
image: containous/whoami
ports:
- name: web
containerPort: 80It worked in v3 with:
yq w -i deployment.yaml "spec.template.spec.containers(name==whoami-container).image" "containous/whoami:v2"
But I can't get it to work in v4:
yq e '.spec.template.spec.containers | select(.name == "whoami-container")' deployment.yaml
Metadata
Metadata
Assignees
Labels
No labels