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

[proposal] How to Better Integrate Mid-Tier Runtime Hooks with Batch Resources? #2161

Open
tan90github opened this issue Aug 7, 2024 · 1 comment

Comments

@tan90github
Copy link
Contributor

What is your proposal:

In light of the proposal #1762, we have been working on the implementation of the mid-tier resource runtimeHook recently. During development, we've encountered potential redundancies in the runtimeHook implementations between mid-tier and batch resources, with some details challenging to separate distinctly. We are seeking insights from the community regarding how compatibility between mid-tier and batch was initially addressed during the development of batch resources.

Why is this needed:

With the introduction of new features such as CPU normalization in batch resources, the integration of mid-tier resources may become increasingly complex. We are interested in any advice the community might have regarding the development of mid-tier and batch resources in terms of cgroup implementation.

Is there a suggested solution, if so, please add it:

We are considering several development approaches and would appreciate any recommendations from the community:

Plan 1: Mirroring the previous PR #1984, we aim to leverage the existing batchResource code extensively, including hooks, reconcilers, and rules. This approach might lead to a unified extended resource model, where feature gating cannot differentiate between batch and mid-tier resources, potentially causing issues with shared rules for mid-tier and batch, especially with the integration of mid-tier and batch resources.

Plan 2: Copy all code from the batchresource directory and rename 'batch' to 'mid'. This allows differentiation but results in high code redundancy.

Plan 3: Refactor the batchresource code to extract fundamental functions for use by both mid-tier and batch resources, which introduces greater risk.

Other potential plans that we may not have considered yet...

@tan90github tan90github added the kind/proposal Create a report to help us improve label Aug 7, 2024
@tan90github
Copy link
Contributor Author

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

2 participants