-
Notifications
You must be signed in to change notification settings - Fork 225
Standardize ProviderConfig for Cluster and Machine #672
Standardize ProviderConfig for Cluster and Machine #672
Conversation
In order to maintain type parity for providerConfig across both Machine and Cluster types, change the ClusterSpec.ProviderConfig to the ProviderConfig type. Additionally, as all changes to the API require regenerating code, add a Makefile that will simplify that process. Signed-off-by: Craig Tracey <craigtracey@gmail.com>
88b12e9
to
bc2aab4
Compare
/ok-to-test |
/assign krousey cc @krousey |
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.
Thanks for doing this. Just a couple of comments.
|
||
// No more than one of the following may be specified. | ||
|
||
// Value is an inlined, serialized representation of the 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.
remove "node" and replace appropriately.
|
||
import runtime "k8s.io/apimachinery/pkg/runtime" | ||
|
||
// ProviderConfig defines the configuration to use during node creation. |
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.
"node"
cluster-api/Makefile
Outdated
all: genapi genconversion | ||
|
||
genapi: | ||
go get -u github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen |
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.
This means we're always using the tool at head. Is it possible to vendor, build from vendor, and use that copy?
cluster-api/Makefile
Outdated
apiregister-gen -i ./pkg/apis,./pkg/apis/cluster/v1alpha1 | ||
|
||
genconversion: | ||
go get -u k8s.io/code-generator/cmd/conversion-gen |
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 vendoring comment for this.
Modify the dep config to lock our codegen dependencies and make use of these dependencies in a top-level Makefile. Signed-off-by: Craig Tracey <craigtracey@gmail.com>
Updating vendor dependencies in response to introduction of k8s.io/code-generator. Signed-off-by: Craig Tracey <craigtracey@gmail.com>
As this code has moved from being Machine-specific to being generic, remove references to "node" in favor of "resource." "resource" has been chosen as this type may be leveraged by any type that would like to implement "providerConfig" semantics. Signed-off-by: Craig Tracey <craigtracey@gmail.com>
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: craigtracey, krousey 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 |
What this PR does / why we need it:
In order to maintain type parity for providerConfig across both Machine
and Cluster types, change the ClusterSpec.ProviderConfig to the
ProviderConfig type.
Additionally, as all changes to the API require regenerating code, add a
Makefile that will simplify that process.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Release note:
@kubernetes/kube-deploy-reviewers