gyfora commented on code in PR #529:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/529#discussion_r1102511810
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/deployment/AbstractFlinkResourceReconciler.java:
##########
@@ -468,6 +468,16 @@ protected void setOwnerReference(CR owner, Configuration
deployConfig) {
KubernetesConfigOptions.JOB_MANAGER_OWNER_REFERENCE,
List.of(ownerReference));
}
+ private JobAutoScaler loadJobAutoscaler() {
+ for (JobAutoScalerFactory factory :
ServiceLoader.load(JobAutoScalerFactory.class)) {
+ LOG.info("Loading JobAutoScaler implementation: {}",
factory.getClass().getName());
+ return factory.create(kubernetesClient, eventRecorder);
+ }
+ LOG.info("No JobAutoscaler implementation found. Autoscaling is
disabled.");
+ return new NoopJobAutoscaler();
Review Comment:
Instead of the ServiceLoader maybe it would be better to use the same plugin
mechanism that we use for other components (see my related other comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]