After a few minutes of inactivity (i.e no events related to the kind being watched) the listener stops listening (stops receiving events from the K8s API). Here's my rulebook:
- name: Listen for newly added Secret resources
hosts: all
sources:
- sabre1041.eda.k8s:
api_version: v1
kind: Secret
api_key: "{{ api_key }}"
host: "{{ host }}"
validate_certs: false
rules:
- name: Notify added
condition: event.type == "ADDED"
action:
debug:
msg: "A new Secret was added: {{ event }}"
- name: Notify modified
condition: event.type == "MODIFIED"
action:
debug:
msg: "A new Secret was modified: {{ event }}"
After a few minutes of inactivity (i.e no events related to the kind being watched) the listener stops listening (stops receiving events from the K8s API). Here's my rulebook: