Make jobs optional on upgrade by cognifloyd · Pull Request #255 · StackStorm/stackstorm-k8s

@cognifloyd

Some helm upgrades do not need to run all the jobs. An upgrade that only touches RBAC config, for example, does not need to run the register-content and other jobs. Use --set jobs.default_hooks.register_content=false to skip the register-content job. Do likewise for other jobs that you'd like to skip. Use --set 'jobs.skip={apikey_load,key_load,register_content}' to skip the jobs that do not deal with RBAC.

Closes #226

@cognifloyd

@cognifloyd

@cognifloyd cognifloyd changed the title Optional upgrade jobs Make jobs optional on upgrade

Oct 13, 2021

@cognifloyd

An alternative to --set jobs.default_hooks.<job>=false might be --set 'jobs.skip={<job>,<job>,<job>}' with values like:

jobs:
  # a list of jobs to skip. This is useful in targeted upgrades.
  # Possible jobs include: apply_rbac_definitions, apikey_load, key_load, register_content
  # For example, to only upgrade rbac settings you might use:
  #   helm upgrade ... --set 'jobs.skip={apikey_load,key_load,register_content}'
  skip: []

What do you think @armab ?

@cognifloyd

@cognifloyd

OK. I switched to --set jobs.skip as it is a more comfortable interface.

arm4b

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@cognifloyd