added dataSourceOperator interface instead of dataSourceOperator class
added generic implementation DataSourceOperatorImpl for the interface
added prometheus specific implementation PrometheusDataOperatorImpl for the interface
modified the metricHandler to use new interface
implemented the getDNSBasedURL in dataSourceInfo class
added required constants and exceptions
Type of change
[x] Refactoring Code
[ ] New feature
How has this been tested?
Using kruize-demo scripts.
Image: quay.io/rh-ee-shesaxen/autotune:kruize-dsop
Test Configuration
Kubernetes clusters tested on: minikube
Checklist :dart:
[X] Followed coding guidelines
[X] Comments added
[ ] Dependent changes merged
[ ] Documentation updated
[ ] Tests added or updated
Additional information
https://github.com/kruize/autotune/pull/1131 should be merged before this PR, as it uses updated dataSourceInfo constructors.
Cleanup for old data source operator will be in next PR.
Description
This PR will do the following changes -
dataSourceOperator
interface instead ofdataSourceOperator
classDataSourceOperatorImpl
for the interfacePrometheusDataOperatorImpl
for the interfacemetricHandler
to use new interfacegetDNSBasedURL
indataSourceInfo
classType of change
How has this been tested?
Using kruize-demo scripts. Image:
quay.io/rh-ee-shesaxen/autotune:kruize-dsop
Test Configuration
Checklist :dart:
Additional information
https://github.com/kruize/autotune/pull/1131 should be merged before this PR, as it uses updated
dataSourceInfo
constructors. Cleanup for old data source operator will be in next PR.