kubernetes-client
kubernetes-client copied to clipboard
Add `hasSpec` Abstraction Over Kubernetes Resource
Is your enhancement related to a problem? Please describe
In Java Operator SDK we would like to automate some of the aspects of dependent resource management. In a default use-case when a reconciliation happens, the spec of the target resource is compared to the spec of the actual resource. Currently we use hasMetadata as the base class, would be great to have access to the specs through some abstraction.
Describe the solution you'd like
Having hasSpec of a standalone interface or as an interface that extends hasMetadata.
Could look like this:
public interface HasSpec<T> {
T getSpec();
void setSpec(T value);
}
Describe alternatives you've considered
Alternative is read this via reflection. What is not the most elegant solution.
Additional context
No response
Relates to #3586
Updated the description. We will need also setSpec(T).
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
Would like to re-open this as this should still be addressed, imo.