Skip to content

feat - Added K8s warnings capture for select operations. Resolves #647#2319

Open
chriswhite199 wants to merge 2 commits into
kyverno:mainfrom
chriswhite199:main
Open

feat - Added K8s warnings capture for select operations. Resolves #647#2319
chriswhite199 wants to merge 2 commits into
kyverno:mainfrom
chriswhite199:main

Conversation

@chriswhite199
Copy link
Copy Markdown

Explanation

Allows capture of K8s API server warnings for create / apply / update / patch and delete operations, which can then be used in expectations.

This is useful feature for testing Admission controllers that return warnings when resources are amended

Related issue

#647

Proposed Changes

  • Add a new warnings list for Cluster and update the k8s client to add a WarningHandler
  • Update create / apply / update / patch and delete operations to reset this warnings list and inject the list into the bindings as a new variable

Checklist

  • I have read the contributing guidelines.
  • I have read the PR documentation guide and followed the process including adding proof manifests to this PR.
  • This is a new feature and I have added e2e tests that prove my implementation is effective.

@chriswhite199
Copy link
Copy Markdown
Author

e2e Tests are failing due to docker ToS change and rate limiting on image downloads:

Failed to pull image "nginx": failed to pull and unpack image "docker.io/library/nginx:latest": failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/nginx/manifests/sha256:124b44bfc9ccd1f3cedf4b592d4d1e8bddb78b51ec2ed5056c52d3692baebc19: 429 Too Many Requests - Server message: toomanyrequests: You have reached your unauthenticated pull rate limit. https://www.docker.com/increase-rate-limit

@chriswhite199 chriswhite199 changed the title Added K8s warnings capture for select operations. Resolves #647 feat - Added K8s warnings capture for select operations. Resolves #647 Mar 26, 2025
Signed-off-by: Chris White <chriswhite199@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (a18981b) to head (4805e78).
⚠️ Report is 167 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #2319   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants