Open martin-schaefer opened 3 years ago
Hi, as described by imago --help
:
-l string
Kubernetes labels selectors
Warning: applies to Deployment, DaemonSet, StatefulSet and CronJob, not pods !
In your deployment you probably assign pod labels in spec.template.metadata.labels
, these are pods labels and imago wont match them. It will match labels in metadata.labels
of the deployment.
I placed the labels on the deployment resource, not on the pod. Probably it's just a minor syntaxt error on my args section:. e.g I am not sure if two equal signs are correct or there must be one or two dashes before 'update' and 'l'. I found no exact example for my case. Can you give me a working example?
"args": [
"--update",
"--l=continous-deployment=true"
],
Would this be correct?
"args": [
"--update",
"-l metadata.labels.continous-deployment=true"
],
@martin-schaefer
I think you want to use "field-selector" instead of label selector?
Usage of imago-linux-amd64:
....
-field-selector string
Kubernetes field-selector
example: metadata.name=myapp
Or: use label selectors -l continous-deployment=true (without the metadata boilerplate)
Hi,
I want to use a label on my kubernetes deployments, so imago will only update the ones which a marked. But I a m not sure how the correct syntax for the command is, and several tries did not work. The label I want to use is:
continous-deployment: true
I've deployed imago as cronjob and in my spec I gave the following args, but this did not work. Imago does not update anything.
Is this supported and what are the correct args for this? Thanks for any help.