Skip to content

[operator] consider extending the visibility of fields in base implementations #426

@kittaakos

Description

@kittaakos

Is your feature request related to a problem? Please describe.

Please extend the visibility of the fields in the default implementations. Thank you

From the docs:

We provide a library (`org.eclipse.theia.cloud.operator`), as well as a default implementation (`org.eclipse.theia.cloud.defaultoperator`) for the operator.
The library can be used to create an operator customized to your use cases.
The default implementation is a production-ready operator that handles most use cases on most cloud providers out of the box and is used in our demos.

There is a nice way to customize the Guice module, but all fields are private, making it inconvenient to customize in a downstream project:

@Inject
private TheiaCloudClient resourceClient;
@Inject
protected Set<OperatorPlugin> operatorPlugins;
@Inject
private AppDefinitionHandler appDefinitionAddedHandler;
@Inject
private WorkspaceHandler workspaceHandler;
@Inject
private SessionHandler sessionHandler;
@Inject
private TheiaCloudOperatorArguments arguments;
private final Map<String, AppDefinition> appDefinitionCache = new ConcurrentHashMap<>();
private final Map<String, Workspace> workspaceCache = new ConcurrentHashMap<>();
private final Map<String, Session> sessionCache = new ConcurrentHashMap<>();
private final Set<SpecWatch<?>> watches = new LinkedHashSet<>();

Describe the solution you'd like

Fields are protected, making it easier to customize the default implementation.

Describe alternatives you've considered

Use Java reflection for the framework customization

Cluster provider

No response

Additional information

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions