Skip to content
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

Add hasSpec Abstraction Over Kubernetes Resource #3816

Open
csviri opened this issue Feb 8, 2022 · 4 comments
Open

Add hasSpec Abstraction Over Kubernetes Resource #3816

csviri opened this issue Feb 8, 2022 · 4 comments

Comments

@csviri
Copy link
Contributor

csviri commented Feb 8, 2022

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

@manusa
Copy link
Member

manusa commented Feb 8, 2022

Relates to #3586

@csviri
Copy link
Contributor Author

csviri commented Feb 21, 2022

Updated the description. We will need also setSpec(T).

@metacosm metacosm added this to the 6.0.0 milestone Mar 1, 2022
@stale
Copy link

stale bot commented May 30, 2022

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!

@stale stale bot added the status/stale label May 30, 2022
@stale stale bot closed this as completed Jun 6, 2022
@metacosm
Copy link
Collaborator

Would like to re-open this as this should still be addressed, imo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants