From b0d40091d48f0be7423fb205ae5f79706287d107 Mon Sep 17 00:00:00 2001 From: Kaio Oliveira Date: Thu, 23 Jul 2026 18:10:09 -0300 Subject: [PATCH] fix: [AAP-84188] add a finalizer playbook to the EDA CR Rulebook Activation pods should be cleaned up when the EDA CR is deleted (i.e, an uninstall). We now add a simple playbook to take care of deleting the Jobs that the activation workers create for the rulebook activations. Co-Authored-By: Claude --- playbooks/eda_finalizer.yml | 14 ++++++++++++++ watches.yaml | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 playbooks/eda_finalizer.yml diff --git a/playbooks/eda_finalizer.yml b/playbooks/eda_finalizer.yml new file mode 100644 index 00000000..1fcb9e42 --- /dev/null +++ b/playbooks/eda_finalizer.yml @@ -0,0 +1,14 @@ +--- +- hosts: localhost + gather_facts: no + collections: + - kubernetes.core + tasks: + - name: Delete all activation Jobs + k8s: + api_version: batch/v1 + kind: Job + namespace: '{{ ansible_operator_meta.namespace }}' + state: absent + label_selectors: + - "app=eda" diff --git a/watches.yaml b/watches.yaml index bf1c54f2..bdb389d1 100644 --- a/watches.yaml +++ b/watches.yaml @@ -3,6 +3,9 @@ group: eda.ansible.com kind: EDA playbook: playbooks/eda.yml + finalizer: + name: eda.ansible.com/finalizer + playbook: playbooks/eda_finalizer.yml - version: v1alpha1 group: eda.ansible.com