-
Notifications
You must be signed in to change notification settings - Fork 32
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
Feature/add timeseries prediction crd #2
Feature/add timeseries prediction crd #2
Conversation
ea40cbf
to
8d77b70
Compare
prediction/v1alpha1/types.go
Outdated
// MetricName is the name of your metric, such as cpu, mem, disk, network, or something else. | ||
MetricName string `json:"metricName,omitempty"` | ||
// MetricSource is the source of your metric, only supports prometheus now. | ||
MetricSource string `json:"metricSource,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is MetricSource for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is labels?
prediction/v1alpha1/types.go
Outdated
@@ -1,6 +1,7 @@ | |||
package v1alpha1 | |||
|
|||
import ( | |||
"fmt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is go format triggerred? runtime and non-runtime import should be separated
8d77b70
to
64c1ba3
Compare
64c1ba3
to
5120290
Compare
|
||
// Sample pairs a Value with a Timestamp. | ||
type Sample struct { | ||
Value string `json:"value,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use a computable type for Value
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resource quantity in k8s do not supports float number, we can use string temporarily. later we can implements a type Value like open telemetry in our api not apis crd. because it has some methods definition
prediction/v1alpha1/types.go
Outdated
// Then next RefreshFrequencySeconds it will do prediction again and update the status of the crd. | ||
// RefreshFrequencySeconds must less than PredictionCycleSeconds. typically it is 1h, 30m, half of your PredictionCycleSeconds. | ||
// Do not set it too small, such as 1s, 1min, 5min, because the predicted data may has no changes in short periods. | ||
RefreshFrequencySeconds int32 `json:"refreshFrequencySeconds,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember which case should set RefreshFrequencySeconds
, if no can we just merge it with predictionCycleSeconds
into one field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean one field struct which includes the two? or just one predictionCycleSeconds? it the latter, then the status update is driven by the algorithm data stream and algorithm data source update interval. only the algorithm data updated, predicted data in the prediction crd status updated. the latter we do not expose two much internal behaviors to users
prediction/v1alpha1/types.go
Outdated
} | ||
|
||
// PrometheusQueryExpression | ||
type PrometheusQueryExpression struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest using QueryExpression
prediction/v1alpha1/types.go
Outdated
} | ||
|
||
// CloudMonitorQueryExpression | ||
type CloudMonitorQueryExpression struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MetricSelector?
/LGTM |
c5f56fb
to
99a4108
Compare
/lgtm |
No description provided.