4 min read
|
Saved February 14, 2026
|
Copied!
Do you care about this?
This article details a mentorship experience focused on enhancing the performance of the Kyverno CLI by identifying and addressing key bottlenecks. The author implemented solutions that reduced execution time for policy application from 15 minutes to just 1-2 seconds for large clusters. Insights into open source contribution and community support are also shared.
If you do, here's more
In early 2025, the author discovered Kyverno, a cloud-native policy engine for Kubernetes, and joined the LFX Mentorship program to contribute to its development. The mentorship lasts 12 weeks and helps participants engage with open source projects while gaining practical experience. The author applied to the program by detailing their background, motivation, and prior contributions to Kyverno. Once selected, they worked closely with mentors to understand the project's challenges and develop a design proposal.
The primary issue addressed was the slow execution time of the Kyverno CLI when applying policies to over 3000 resources. Initially, the command took around 10-15 minutes due to three main bottlenecks: sequential resource loading from the cluster, redundant namespace fetching, and inefficient RestMapper discovery. To tackle these, the author implemented several solutions: a concurrent resource loader that processes multiple resources simultaneously, a namespace cache to reduce unnecessary API calls, and a deferred RestMapper that loads resources only when needed.
These changes drastically improved performance. The execution time for applying policies dropped from 15 minutes to just 1-2 seconds, marking a 99% reduction. The concurrent resource loader alone increased efficiency by 80% compared to the previous method. The enhancements not only streamlined policy validation but also provided users with configurable options to optimize performance further. Overall, the mentorship experience transformed the authorβs approach to open source, emphasizing collaboration and idea sharing within the supportive Kyverno community.
Questions about this article
No questions yet.