diff --git a/changelog.d/20260924_163919_piotr_exclude_individual_init_jobs.md b/changelog.d/20260924_163919_piotr_exclude_individual_init_jobs.md new file mode 100644 index 0000000..9714be0 --- /dev/null +++ b/changelog.d/20260924_163919_piotr_exclude_individual_init_jobs.md @@ -0,0 +1,30 @@ + + + +### Added + +- Individual init jobs can now be excluded from execution. + + + + diff --git a/drydock/plugin.py b/drydock/plugin.py index e514e6d..6b81845 100644 --- a/drydock/plugin.py +++ b/drydock/plugin.py @@ -96,7 +96,10 @@ def get_init_tasks(): render_command = tutor_env.render_str(TUTOR_CONFIG, command) - template["metadata"]["name"] = "drydock-" + template["metadata"]["name"] + "-" + str(i) + template["metadata"]["name"] = f"drydock-{template['metadata']['name']}-{i}" + if template["metadata"]["name"] in excluded_init_jobs: + continue + template["metadata"]["labels"].update( { "app.kubernetes.io/component": "drydock-job",