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

Vsphere enable autoscaling from/to zero #839

Conversation

SamuelStuchly
Copy link
Contributor

This PR adds a new controller to annotate machinesets with information required to enable autoscaling to/from zero based on providerSpec input based on openshift/enhancements#186.

Analogous to openshift/cluster-api-provider-aws#301, openshift/cluster-api-provider-azure#112 and openshift/cluster-api-provider-gcp#77.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 6, 2021
@SamuelStuchly SamuelStuchly changed the title WIP: Vsphere enable autoscaling from/to zero Vsphere enable autoscaling from/to zero Apr 7, 2021
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 7, 2021
@SamuelStuchly
Copy link
Contributor Author

/retest

@@ -4,6 +4,7 @@ go 1.13

require (
github.com/blang/semver v3.5.1+incompatible
github.com/go-logr/logr v0.3.0
Copy link
Contributor

@lobziik lobziik Apr 7, 2021

Choose a reason for hiding this comment

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

Do we really need this? Can we use klog as we do everywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

explanation by @JoelSpeed: "This interface is what controller runtime uses, so if we just use klog directly, we lose the logging that controller runtime would emit, so it's better to use the logger interface so we are sharing what controller runtime is doing"

Copy link
Contributor

Choose a reason for hiding this comment

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

This is already a dependency, though just be an indirect dependency up to this point, looks like we have already run make vendor on this PR right? As there are no changes to go.sum this shows it's not a new depdencency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, seems thats the case.

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

i'm not following why we are creating a new machineset crd manifest and the machineset controller for vsphere. @SamuelStuchly could you share your thoughts?

nvm, i see what you have done in regards to the other PRs you linked

@SamuelStuchly
Copy link
Contributor Author

/retest

2 similar comments
@SamuelStuchly
Copy link
Contributor Author

/retest

@SamuelStuchly
Copy link
Contributor Author

/retest

Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

/approve

Looks fine to me, left a minor improvement comment but could take it or leave it

@@ -4,6 +4,7 @@ go 1.13

require (
github.com/blang/semver v3.5.1+incompatible
github.com/go-logr/logr v0.3.0
Copy link
Contributor

Choose a reason for hiding this comment

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

This is already a dependency, though just be an indirect dependency up to this point, looks like we have already run make vendor on this PR right? As there are no changes to go.sum this shows it's not a new depdencency

Comment on lines +98 to +104
switch t := err.(type) {
case *mapierrors.MachineError:
if t.Reason == machinev1.InvalidConfigurationMachineError {
return true
}
}
return false
Copy link
Contributor

Choose a reason for hiding this comment

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

If you use the errors package you can use errors.Is instead of this function, it detects wrapped errors and unwraps them until it finds the error you wanted (if it was ever in the chain)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After further talk with @JoelSpeed we decided the change is not actually worth here.

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 8, 2021
@lobziik
Copy link
Contributor

lobziik commented Apr 9, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 9, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 9, 2021

@SamuelStuchly: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-gcp-operator 7112e79 link /test e2e-gcp-operator
ci/prow/e2e-vsphere-upgrade 7112e79 link /test e2e-vsphere-upgrade

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

thanks Sam!
/lgtm

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 3bb9fc5 into openshift:master Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants