-
I have a Kubernetes manifest (Deployment) that looks like this: piVersion: apps/v1
kind: Deployment
metadata:
name: ctr
spec:
replicas: 1
template:
metadata:
labels:
app: ctr
spec:
containers:
- name: ctr-app
image: r.example.org/ctr:local
ports:
- containerPort: 8080
name: web
env:
- name: "ANOTHER_VARIABLE"
value: "r.example.org/app:v1.2.3" I would like to use |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Hi @till , it is do-able and it makes sense. You might want to use the # ... scm
# ...
# ... sources ...
target:
updateDeploymentEnvVar:
kind: yaml
name: Update ANOTHER_VARIABLE env. var. in the Deployment manifest
spec:
file: ./path/to/deployment.yaml
key: $.spec.template.spec.containers[0].env[0].value |
Beta Was this translation helpful? Give feedback.
-
@till Another approach would be to use the yaml plugin with the yamlpath engine.
solution 1 relies on transformers to add quotes while the second approach disable source input and use the templating syntax.
|
Beta Was this translation helpful? Give feedback.
-
All the targets in a single Updatecli file will target the same pullrequest assuming they all have the scmid set to the same value than the action. |
Beta Was this translation helpful? Give feedback.
@till Another approach would be to use the yaml plugin with the yamlpath engine.