-
Notifications
You must be signed in to change notification settings - Fork 440
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
Expose Horizontal Pod Autoscaler Behavior and add hpa scaledown test #1077
Changes from 6 commits
f4abf28
7b51fee
43710b9
7070f4b
ae83264
19154be
108d0f1
037aa23
bdc6eb3
60cdfe7
54ff0d3
bcf71e7
0f8e029
a42084c
f3a682c
c14096d
89a2f48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,6 +129,15 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { | |
return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas should be one or more") | ||
} | ||
|
||
if r.Spec.Autoscaler != nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should also check that min or max replicas is set in order to use this feature There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's inside an if statement that's checking whether maxReplicas is set. |
||
if r.Spec.Autoscaler.ScaleDown != nil && *r.Spec.Autoscaler.ScaleDown < int32(1) { | ||
return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, scaleDown should be one or more") | ||
} | ||
|
||
if r.Spec.Autoscaler.ScaleUp != nil && *r.Spec.Autoscaler.ScaleUp < int32(1) { | ||
return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, scaleUp should be one or more") | ||
} | ||
} | ||
} | ||
|
||
return nil | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
question: did we consider embedding the HPA spec in here? Or at least embed the autoscaling behavior spec here?
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 was just adding enough code to be able to get an e2e test to work within the time allocated, which means we need to scale down much quicker that the default 300 seconds.
@pavolloffay what do you think? Do I need to add the other values of PA scaling rules here?
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.
For my use case, I know that I would like to be able to specify policies and not just
StabilizationWindowSeconds
. Embedding onlyStabilizationWindowSeconds
is going to make it so we need to add in each feature on request, making a code change for each one.