kyverno: [Bug] Admission controller "ephemeralreports.reports.kyverno.io already exists" error with 1.12

Kyverno Version

1.12.3

Kubernetes Version

1.29.x

Kubernetes Platform

EKS

Kyverno Rule Type

Validate

Description

Using the default disallow-default-namespace rule, after upgrading from Kyverno 1.11 to 1.12.3, I see the following errors continually printed by Kyverno’s admission controller:

{"level":"error","ts":"2024-06-06T23:48:21Z","logger":"webhooks.resource.validate","caller":"validation/validation.go:178","msg":"failed to create report","gvk":"/v1, Kind=Pod","gvr":{"group":"","version":"v1","resource":"pods"},"namespace":"x","name":"x","operation":"UPDATE","uid":"93eec02a-3872-4b86-a0f1-205e580f3f0d","user":{"username":"x","uid":"5d80b186-d5a5-4bb5-abdd-a6f525806f38","groups":["system:serviceaccounts","system:serviceaccounts:x","system:authenticated"],"extra":{"authentication.kubernetes.io/pod-name":["x"],"authentication.kubernetes.io/pod-uid":["664ef031-87cc-4607-9cbd-8f9251db5de8"]}},"roles":["x"],"clusterroles":["x","system:service-account-issuer-discovery"],"resource.gvk":"/v1, Kind=Pod","kind":"Pod","URLParams":"","error":"ephemeralreports.reports.kyverno.io \"93eec02a-3872-4b86-a0f1-205e580f3f0d\" already exists"}

The oldest ephemeralreport in the system is only about a minute old, so it seems to be continually conflicting? This didn’t happen in v1.11

Steps to reproduce

  1. Install the “disable-default-namespace” policy
  2. Use 1.12

Expected behavior

I dont see this error printed several times a second

Screenshots

No response

Kyverno logs

{"level":"error","ts":"2024-06-06T23:48:21Z","logger":"webhooks.resource.validate","caller":"validation/validation.go:178","msg":"failed to create report","gvk":"/v1, Kind=Pod","gvr":{"group":"","version":"v1","resource":"pods"},"namespace":"x","name":"x","operation":"UPDATE","uid":"93eec02a-3872-4b86-a0f1-205e580f3f0d","user":{"username":"x","uid":"5d80b186-d5a5-4bb5-abdd-a6f525806f38","groups":["system:serviceaccounts","system:serviceaccounts:x","system:authenticated"],"extra":{"authentication.kubernetes.io/pod-name":["x"],"authentication.kubernetes.io/pod-uid":["664ef031-87cc-4607-9cbd-8f9251db5de8"]}},"roles":["x"],"clusterroles":["x","system:service-account-issuer-discovery"],"resource.gvk":"/v1, Kind=Pod","kind":"Pod","URLParams":"","error":"ephemeralreports.reports.kyverno.io \"93eec02a-3872-4b86-a0f1-205e580f3f0d\" already exists"}

Slack discussion

No response

Troubleshooting

  • I have read and followed the documentation AND the troubleshooting guide.
  • I have searched other issues in this repository and mine is not recorded.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 32 (14 by maintainers)

Most upvoted comments

ok, waiting for official release, @realshuting

It’s been cut today and will be available soon https://github.com/kyverno/kyverno/pull/10653.

perfect, keep me posted, thank @realshuting

@realshuting shall we have 1.12.5 this week, asking so as to align our upgrade activity.

Hi @truongnht - we are working on back-porting the ephemeral report circuit breaker to 1.12.5 and aiming to cut the release candidate by this week, would that work for you?

@realshuting and with the new shared image, the workloads have been pretty smooth compared to 1.12.3. Look forwards to the new release 😉

Hi @truongnht - the PR has been merged to 1.12 branch and a test image will be published via https://github.com/kyverno/kyverno/actions/runs/9610666606/job/26507613062, can you verify with this image?

We are adding other changes to 1.12.5 including the circuit breaker for ephemeralreports, will cut a release candidate with these changes.

Here’s the test image ghcr.io/kyverno/kyverno@sha256:b68da4a9a36b8fbcc8623842f9b23e5b244d03f231d10d39b01411d71f05ed60.

Will it be in next 1.12 release, @realshuting?

Yes, we will cut v1.12.5-rc.1 once the fix is merged to 1.12 branch for you to verify.