I have set serviceMonitor.enabled=true. But Prometheus can scape the python metrics only and not trivy metrics. Also the operator stops logging, but the pod is running:
β [2022-02-03 09:10:56,507] kopf.activities.star [INFO ] CRD already exists!!! β
β [2022-02-03 09:10:56,508] kopf.activities.star [INFO ] Activity 'startup_fn_crd' succeeded. β
β [2022-02-03 09:10:56,673] kopf.activities.star [INFO ] trivy cache created... β
β [2022-02-03 09:10:56,674] kopf.activities.star [INFO ] Activity 'startup_fn_trivy_cache' succeeded. β
β [2022-02-03 09:10:56,675] kopf.activities.star [INFO ] Prometheus Exporter started... β
β [2022-02-03 09:10:56,676] kopf.activities.star [INFO ] Activity 'startup_fn_prometheus_client' succeeded. β
β [2022-02-03 09:10:56,693] kopf.activities.star [INFO ] Day to certifiacet expiration: 364 β
β [2022-02-03 09:10:56,694] kopf.activities.star [INFO ] Activity 'configure' succeeded. β
β [2022-02-03 09:10:56,696] kopf._core.engines.a [INFO ] Initial authentication has been initiated. β
β [2022-02-03 09:10:56,701] kopf.activities.auth [INFO ] Activity 'login_via_client' succeeded. β
β [2022-02-03 09:10:56,701] kopf._core.engines.a [INFO ] Initial authentication has finished. β
β [2022-02-03 09:10:57,065] kopf._core.reactor.o [WARNING ] Not enough permissions to watch for resources: changes (creation/deletion/updates) will not be noticed; the resources are only refreshed on operator restarts. β
β [2022-02-03 09:10:57,171] kopf.objects [INFO ] [trivy-scan/trivy-operator-main-config] NamespaceScanner Created
Cron is set to */5 * * * *.
The label "trivy-operator-validation: "true" works. So I cannot start a vulnerable pod.