You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My CRD controller manages a variety of child resources. During reconciliation, I compare the current spec against the desired state. However, some fields are stored in a different format by Kubernetes – for example, CPU values. If the user specifies 0.2, Kubernetes stores it as 200m, causing unnecessary event churn.
I could preprocess these values in my spec before applying, but is this a sustainable and reliable approach? This issue isn't limited to CPU – memory limits and potentially other fields may also be affected.
Would using a predicate for spec comparison be more reliable in such cases? How do you handle these formatting discrepancies effectively?
The text was updated successfully, but these errors were encountered:
Anuragch
changed the title
Stable way to compare spec
Query: Stable way to compare spec
May 16, 2025
Hi all,
My CRD controller manages a variety of child resources. During reconciliation, I compare the current spec against the desired state. However, some fields are stored in a different format by Kubernetes – for example, CPU values. If the user specifies 0.2, Kubernetes stores it as 200m, causing unnecessary event churn.
I could preprocess these values in my spec before applying, but is this a sustainable and reliable approach? This issue isn't limited to CPU – memory limits and potentially other fields may also be affected.
Would using a predicate for spec comparison be more reliable in such cases? How do you handle these formatting discrepancies effectively?
The text was updated successfully, but these errors were encountered: