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

Merged
merged 3 commits into from Feb 15, 2018

Conversation

@x13n
Member

x13n commented Feb 9, 2018

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:

fluentd-gcp resources can be modified via a ScalingPolicy

cc @kawych @justinsb

@x13n

This comment has been minimized.

Member

x13n commented Feb 9, 2018

/assign @piosz
/unassign @crassirostris

@crassirostris

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

This comment has been minimized.

@crassirostris

crassirostris Feb 12, 2018

Member

Use semver for consistency?

This comment has been minimized.

@x13n

x13n Feb 13, 2018

Member

Done.

fi
if [[ -n "${request_resources}" ]]; then
modifying_flags="${modifying_flags} --requests=${request_resources}"
if ! $any_overrides; then

This comment has been minimized.

@crassirostris

crassirostris Feb 12, 2018

Member

Won't it crash if there are no overrides?

This comment has been minimized.

@x13n

x13n Feb 13, 2018

Member

Why would it? If there are no overrides, then $any_overrides equals false.

This comment has been minimized.

@crassirostris

crassirostris Feb 13, 2018

Member

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

This comment has been minimized.

@x13n

x13n Feb 13, 2018

Member

But the variable is defined, see line 1985.

This comment has been minimized.

@crassirostris

crassirostris Feb 13, 2018

Member

Missed it, then everything's fine, thanks :)

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: scalingpolicies.scalingpolicy.kope.io

This comment has been minimized.

@crassirostris

This comment has been minimized.

@x13n

x13n Feb 13, 2018

Member

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.

@x13n

This comment has been minimized.

Member

x13n commented Feb 13, 2018

/assign @bowei

@crassirostris

This comment has been minimized.

Member

crassirostris commented Feb 13, 2018

/assign

@x13n

This comment has been minimized.

Member

x13n commented Feb 13, 2018

Btw, I updated configure-helper.sh to use full resource name.

@crassirostris

/lgtm

fi
if [[ -n "${request_resources}" ]]; then
modifying_flags="${modifying_flags} --requests=${request_resources}"
if ! $any_overrides; then

This comment has been minimized.

@crassirostris

crassirostris Feb 13, 2018

Member

Missed it, then everything's fine, thanks :)

@k8s-ci-robot k8s-ci-robot added the lgtm label Feb 13, 2018

@x13n

This comment has been minimized.

Member

x13n commented Feb 14, 2018

/assign @gmarek
Marek, can you take a look?

@x13n

This comment has been minimized.

Member

x13n commented Feb 14, 2018

/area platform/gce
/area platform/gke

@gmarek

This comment has been minimized.

Member

gmarek commented Feb 15, 2018

/approve no-issue

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Feb 15, 2018

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Feb 15, 2018

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Feb 15, 2018

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-merge-robot k8s-merge-robot merged commit d3bacb9 into kubernetes:master Feb 15, 2018

12 of 13 checks passed

Submit Queue Required Github CI test is not green: pull-kubernetes-e2e-gce
Details
cla/linuxfoundation x13n authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Job succeeded.
Details
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-unit Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
@mikedanese

This comment has been minimized.

Member

mikedanese commented Jun 13, 2018

Hey, this is an alpha API. We can't run this in non-alpha clusters. Furthermore this API went through no review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment