Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
policyfiltermetrics: add policyfilter_hook_container_name_missing_total
metric After adding the support for filtering policies by container name, we decided not to abort the OCI hook when this detail is not present for some reason not to break other filtering methods like pod labels. However, we need to monitor such operations when the container name is missing. This patch aims to do this by adding a new "policyfilter_hook_container_name_missing_total" metric. The counter will be increased when the container name cannot be found in the "createContainerHook" function. Besides, this patch adds a missing return statement for the case when adding a container to pod from OCI hook fails and we inform the user that we are aborting the hook. In order to still have a counter increase upon error, we run the counter increase logic before checking the error. Fixes: #1879 Signed-off-by: Oleh Neichev <[email protected]>
- Loading branch information