Skip to content
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

Supporting batching resources scaling #32

Merged
merged 9 commits into from
Dec 29, 2019

Conversation

Hedingber
Copy link
Contributor

In each cycle of the autoscaler it will first iterate all resources and check which should be scaled to zero, then will scale to zero all of them together. (before this PR the behavior was to trigger scale to zero on every resource separately)

Added some logs improvements for better readability

Copy link
Collaborator

@liranbg liranbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
minor comments regarding loggings, try make it more consistent

@@ -67,7 +67,7 @@ func Run(kubeconfigPath string,
}

func createDLX(resourceScaler scaler_types.ResourceScaler, options scaler_types.DLXOptions) (*dlx.DLX, error) {
rootLogger, err := nucliozap.NewNuclioZap("dlx", "console", os.Stdout, os.Stderr, nucliozap.DebugLevel)
rootLogger, err := nucliozap.NewNuclioZap("scaler", "console", os.Stdout, os.Stderr, nucliozap.DebugLevel)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked offline

pkg/dlx/dlx.go Outdated
resourceScaler scaler_types.ResourceScaler,
options scaler_types.DLXOptions) (*DLX, error) {
resourceStarter, err := NewResourceStarter(logger, resourceScaler, options.Namespace, options.ResourceReadinessTimeout)
childLogger := parentLogger.GetChild("autoscaler")
childLogger.InfoWith("Creating DLX",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one line

pkg/dlx/dlx.go Outdated
resourceScaler scaler_types.ResourceScaler,
options scaler_types.DLXOptions) (*DLX, error) {
resourceStarter, err := NewResourceStarter(logger, resourceScaler, options.Namespace, options.ResourceReadinessTimeout)
childLogger := parentLogger.GetChild("autoscaler")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logger name should be dlx

pkg/dlx/dlx.go Outdated
listenAddress: options.ListenAddress,
handler: handler,
}, nil
}

func (d *DLX) Start() error {
d.logger.InfoWith("Starting",
d.logger.DebugWith("Starting",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one line

@Hedingber Hedingber merged commit 4557d66 into v3io:development Dec 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants