-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add MachineRole to the GCP-specific provider conifg #400
Conversation
[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 |
/hold I need to run at least one actual deployment test with clusterctl before we merge this. |
cloud/google/machineactuator.go
Outdated
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
cloud/google/machineactuator.go
Outdated
} | ||
} | ||
return false | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: remove extra newline.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above.
cloud/google/machineactuator.go
Outdated
"Cannot unmarshal machine's providerConfig field: %v", err), createEventAction) | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: remove extra newline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
818b74e
to
b1d62c1
Compare
I verified that I can still create a cluster with clusterctl, and addressed review feedback. /hold cancel |
lgtm |
/lgtm |
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:
@kubernetes/kube-deploy-reviewers