wave-k8s / wave

Kubernetes configuration tracking controller
Apache License 2.0
646 stars 82 forks source link

Does wave support Kubernetes Jobs #123

Closed IrregularLine closed 2 years ago

IrregularLine commented 2 years ago

We have secrets in the cluster and some secrets will be automatically updated by other apps in the cluster. So we are looking to run a k8s job when the secret gets updated. Is this something wave supports?

mwmahlberg commented 2 years ago

Uhm, Jobs are one-offs. So, what happens is:

  1. Application O updates the secret/configmap
  2. Some time later, Kubernetes starts the Job
  3. A pod is created according to the Job template and the secrets are mounted into it, again according to the job template
  4. The job runs with up to date configuration.

If you have longer running jobs: Frankly, that is a Very Bad Idea™. Think of them as running a script as opposed to running a a daemon.

IrregularLine commented 2 years ago

My question was if wave could detect changes in secrets, and run a k8s job when the secret changes (and the job would update a database or something like that) but we were able to solve it another way, thank you