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

Add MachineRole to the GCP-specific provider conifg #400

Merged
merged 5 commits into from
Jun 26, 2018

Conversation

roberthbailey
Copy link
Contributor

@roberthbailey roberthbailey commented Jun 26, 2018

What this PR does / why we need it: Begins demoting the notion of machine role down into the GCP specific provider config (since that is the primary place it is currently used in the code base).

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
First PR towards fixing #338

Special notes for your reviewer:

Release note:

NONE

@kubernetes/kube-deploy-reviewers

@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 Jun 26, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roberthbailey

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-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 26, 2018
@roberthbailey
Copy link
Contributor Author

/hold

I need to run at least one actual deployment test with clusterctl before we merge this.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2018
currentConfig, err := gce.machineproviderconfig(currentMachine.Spec.ProviderConfig)
if err != nil {
return gce.handleMachineError(currentMachine, apierrors.InvalidMachineConfiguration(
"Cannot unmarshal machine's providerConfig field: %v", err), createEventAction)
Copy link
Contributor

Choose a reason for hiding this comment

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

We are in the Update function so createEventAction seems wrong here (note that on line 417 noEventAction is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

}
}
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.

style: remove extra newline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed (would have thought gofmt would take care of that one...)

@@ -10,6 +10,8 @@ items:
value:
apiVersion: "gceproviderconfig/v1alpha1"
kind: "GCEMachineProviderConfig"
roles:
- Master
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like there should be a corresponding deletion on lines 25 and 26

Copy link
Contributor Author

Choose a reason for hiding this comment

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

some of the common code still uses the roles in the api proper; i'll delete those ones once i fix the common code to no longer depend on roles.

@@ -33,6 +35,8 @@ items:
value:
apiVersion: "gceproviderconfig/v1alpha1"
kind: "GCEMachineProviderConfig"
roles:
- Node
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like there should be a corresponding deletion on lines 49 and 50

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above.

"Cannot unmarshal machine's providerConfig field: %v", err), createEventAction)
}


Copy link
Contributor

Choose a reason for hiding this comment

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

style: remove extra newline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

@roberthbailey
Copy link
Contributor Author

roberthbailey commented Jun 26, 2018

I verified that I can still create a cluster with clusterctl, and addressed review feedback.

/hold cancel

@roberthbailey roberthbailey removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2018
@spew
Copy link
Contributor

spew commented Jun 26, 2018

lgtm

@krousey
Copy link
Contributor

krousey commented Jun 26, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 26, 2018
@k8s-ci-robot k8s-ci-robot merged commit 05bee7c into kubernetes-sigs:master Jun 26, 2018
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. 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.

4 participants