-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Enable scaling fluentd-gcp resources using ScalingPolicy. #59657
Enable scaling fluentd-gcp resources using ScalingPolicy. #59657
Conversation
See https://github.com/justinsb/scaler for more details about ScalingPolicy resource.
/assign @piosz |
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'm little bit concerned about using the short form of the resource in the scaler (looks like a pretty common name, possible collisions) + a couple of nits. Overall LGTM
namespace: kube-system | ||
labels: | ||
k8s-app: fluentd-gcp-scaler | ||
version: v0.1 |
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.
Use semver for consistency?
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.
Done.
fi | ||
if [[ -n "${request_resources}" ]]; then | ||
modifying_flags="${modifying_flags} --requests=${request_resources}" | ||
if ! $any_overrides; then |
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.
Won't it crash if there are no overrides?
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.
Why would it? If there are no overrides, then $any_overrides equals false.
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.
Don't we use the strict mode, which will throw an error if the variable hasn't been explicitly defined before? I remember such error that resulted in #55950
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.
But the variable is defined, see line 1985.
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.
Missed it, then everything's fine, thanks :)
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: scalingpolicies.scalingpolicy.kope.io |
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.
kope.io
?
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 just reused the ScalingPolicy defined by @justinsb in https://github.com/justinsb/scaler. I hope we can ultimately migrate to autoscaling controlled by this ScalingPolicy in the long term.
/assign @bowei |
/assign |
Btw, I updated configure-helper.sh to use full resource name. |
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.
/lgtm
fi | ||
if [[ -n "${request_resources}" ]]; then | ||
modifying_flags="${modifying_flags} --requests=${request_resources}" | ||
if ! $any_overrides; then |
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.
Missed it, then everything's fine, thanks :)
/assign @gmarek |
/area platform/gce |
/approve no-issue |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: crassirostris, gmarek, x13n The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
Hey, this is an alpha API. We can't run this in non-alpha clusters. Furthermore this API went through no review. |
See https://github.com/justinsb/scaler for more details about ScalingPolicy resource.
What this PR does / why we need it:
This is adding a way to override fluentd-gcp resources in a running cluster. The resources syncing for fluentd-gcp is decoupled from addon manager.
Special notes for your reviewer:
Release note:
cc @kawych @justinsb