Skip to content

Query: Stable way to compare spec #3222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Anuragch opened this issue May 16, 2025 · 0 comments
Open

Query: Stable way to compare spec #3222

Anuragch opened this issue May 16, 2025 · 0 comments

Comments

@Anuragch
Copy link

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?

@Anuragch Anuragch changed the title Stable way to compare spec Query: Stable way to compare spec May 16, 2025
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

No branches or pull requests

1 participant