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

Minor cleanup to instance group management #6

Merged
merged 1 commit into from
Oct 9, 2017

Conversation

nicksardo
Copy link
Contributor

@nicksardo nicksardo commented Oct 7, 2017

Changes

  • Fixed log line which was previously printing a slice of memory addresses instead of port numbers.
    glog.V(3).Infof("Instance group %v/%v does not have ports %+v, adding them now.", zone, name, newPorts)
  • Renamed "AddInstanceGroup" to "EnsureInstanceGroupsAndPorts" to actually reflect the actions of the func
  • Split "EnsureInstanceGroups" and created "EnsureInstanceGroupAndPorts" for the actions on a single instance group.
  • Removed unused return variable of nodeports from "EnsureInstanceGroupsAndPorts"

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 7, 2017
Copy link
Contributor

@nikhiljindal nikhiljindal left a comment

Choose a reason for hiding this comment

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

thx for the fixes!
lgtm with 2 minor comments

@@ -61,69 +64,82 @@ func (i *Instances) Init(zl zoneLister) {
// AddInstanceGroup creates or gets an instance group if it doesn't exist
Copy link
Contributor

Choose a reason for hiding this comment

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

Update the comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks

func EnsureInstanceGroupsAndPorts(nodePool NodePool, namer *utils.Namer, ports []int64) ([]*compute.InstanceGroup, []*compute.NamedPort, error) {
return nodePool.AddInstanceGroup(namer.IGName(), ports)
func EnsureInstanceGroupsAndPorts(nodePool NodePool, namer *utils.Namer, ports []int64) ([]*compute.InstanceGroup, error) {
return nodePool.EnsureInstanceGroups(namer.IGName(), ports)
Copy link
Contributor

Choose a reason for hiding this comment

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

How about calling this EnsureInstanceGroupsAndPorts as well?

@nikhiljindal
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 9, 2017
@nicksardo nicksardo merged commit c0ad192 into kubernetes:master Oct 9, 2017
@nicksardo nicksardo deleted the ig-mgmt branch April 18, 2018 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants