Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyStripAnnotationsTransform ¶
ApplyStripAnnotationsTransform applies the strip transform directly to an object. This is a convenience function for cases where you need to strip fields from an object outside of the cache transform context.
Note: This function never returns an error in practice, but returns error to satisfy the TransformFunc interface.
func StripAnnotations ¶
func StripAnnotations() toolscache.TransformFunc
StripAnnotations returns a cache transform function that removes memory-heavy annotation fields that aren't needed for controller operations. This significantly reduces memory usage in informer caches by removing: - kubectl.kubernetes.io/last-applied-configuration annotation (can be very large)
Use this function as a DefaultTransform in controller-runtime cache.Options to reduce memory overhead across all cached objects.
Example:
cacheOptions := cache.Options{
DefaultTransform: cacheutil.StripAnnotations(),
}
func StripManagedFieldsAndAnnotations ¶
func StripManagedFieldsAndAnnotations() toolscache.TransformFunc
StripManagedFieldsAndAnnotations returns a cache transform function that removes memory-heavy fields that aren't needed for controller operations. This significantly reduces memory usage in informer caches by removing: - Managed fields (can be several KB per object) - kubectl.kubernetes.io/last-applied-configuration annotation (can be very large)
Use this function as a DefaultTransform in controller-runtime cache.Options to reduce memory overhead across all cached objects.
Example:
cacheOptions := cache.Options{
DefaultTransform: cacheutil.StripManagedFieldsAndAnnotations(),
}
Types ¶
This section is empty.