Skip to content

Conversation

@csviri
Copy link
Collaborator

@csviri csviri commented Jan 30, 2026

Signed-off-by: Attila Mészáros a_meszaros@apple.com

Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 30, 2026
@metacosm
Copy link
Collaborator

metacosm commented Jan 30, 2026

I was thinking that maybe instead of KubernetesClientFacade, we could name it ExtendedKubernetesClient and return it from the getClient method of the Context but that would mean either:

  • have ExtendedKubernetesClient implement KubernetesClient, hold an instance of the original client and delegate all method calls to it but that would mean having to track changes in the interface in this implementation, which might be annoying and easy to miss
  • have a getUnderlyingClient (or whatever name makes more sense) on the ExtendedKubernetesClient class but that would mean that the client would be even "further" away (and in this case, KubernetesClientFacade would probably be a better name

Actually, the second solution is rather ugly and would be breaking the API anyway…
Also, for the first solution, the methods wouldn't really be at the same semantic level so both are probably a bad idea 😅

@metacosm
Copy link
Collaborator

Based on my last comment, I think we could keep the ReconcileUtils name or maybe ResourceModifier or ResourceChangeUtils (something to mean that it has methods to modify resources)?

Copy link
Collaborator

@xstefank xstefank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, I'm allergic tothe word "facade" :D

I think sth like context.operatorUtils(), context.operations(), context.sdkOperations() would be better

@csviri
Copy link
Collaborator Author

csviri commented Jan 30, 2026

Based on my last comment, I think we could keep the ReconcileUtils name or maybe ResourceModifier or ResourceChangeUtils (something to mean that it has methods to modify resources)?

Naming is always a good question :)

Maybe ResourceUpdateFacade, ResourceOperationsFacade, at the end it is a facade on underlying APIs, or?

@csviri
Copy link
Collaborator Author

csviri commented Jan 30, 2026

For some reason, I'm allergic tothe word "facade" :D

just saw your comment now, why are you allergic? it is actually quite expressing notion

@csviri
Copy link
Collaborator Author

csviri commented Jan 30, 2026

For me utils suffix always impies some static functions...

@metacosm
Copy link
Collaborator

I'd vote for ResourceOperations, nice & simple. I'm not allergic to Facade but I also don't think it adds anything here :)

@csviri
Copy link
Collaborator Author

csviri commented Jan 30, 2026

I'd vote for ResourceOperations, nice & simple. I'm not allergic to Facade but I also don't think it adds anything here :)

Sounds good, will change it, and finalize the PR. Thank you!

@metacosm metacosm changed the title Kubernetes Client Facade instead of Reconcile Utils feat: move ReconcileUtils methods to ResourceOperations accessible from Context Jan 30, 2026
@xstefank
Copy link
Collaborator

I personally always find facade as an indication of an unnecessary abstraction layer.

sound good to me too, now only misses an implementation

Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
@csviri csviri marked this pull request as ready for review January 30, 2026 13:49
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 30, 2026
@openshift-ci openshift-ci bot requested a review from metacosm January 30, 2026 13:49
@csviri csviri requested a review from xstefank January 30, 2026 13:49
@openshift-ci openshift-ci bot requested a review from xstefank January 30, 2026 13:49
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
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.

Having update/patch methods with filtering/caching updates in context (?)

3 participants