-
Notifications
You must be signed in to change notification settings - Fork 305
Centralized cloud provider configuration #471
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
Centralized cloud provider configuration #471
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akutz 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 |
5a40e4e to
cba12c2
Compare
This patch introduces support for a dedicated cloud provider configuration.
This patch removes the field tags for the "ini" package as they add confusion for people who haven't read why the "ini" package is not being used to marshal data.
This patch switches from using a Go template to marshal a cloud provider config to using reflection. This ensures the section and property names match those defined by the "gcfg" field tags.
This patch adds support for the "omitempty" tag to gcfg fields.
This patch updates the YAML examples, generation scripts, and documentation to reflect the new cloud provider configuration.
This patch fixes an issue with the way the cloud provider configuration's workspace datastore was being processed.
This patch moves the machine config properties for datastore, resource pool, and folder into the cluster's cloud provider configuration. CAPV cannot deploy clusters that do not use the vSphere cloud provider anyway due to the way ready state is determined by the node ref controller.
cba12c2 to
62fa84c
Compare
|
/test pull-cluster-api-provider-vsphere-e2e |
|
Hi @frapposelli / @figo / @sidharthsurana / @andrewsykim, Please lgtm this if there are no objections. FWIW, this includes the fix for the CP credentials. |
|
@akutz do we need to make sure the resource management part of cloud provider configure is consistent with VM's resource management configure? (same resource pool etc) cc @andrewsykim |
|
Hi @figo,
I spoke with Andrew, and the decision for the time being was to ensure that the VMs are located in the same workspace used by the cloud provider. Which is already implemented in this PR. The only location attribute available for machines is now the datacenter. Otherwise the location is specified only in the cloud provider configuration. |
| value: | ||
| apiVersion: vsphere.cluster.k8s.io/v1alpha1 | ||
| kind: VsphereMachineProviderSpec | ||
| datacenter: "${VSPHERE_DATACENTER}" |
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.
@akutz it make sense to me now, thx for the explanation, could you help to clarify why datacenter kept in both machine spec and cloud provider configure?
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.
Hi @figo,
Because you can configure multiple datacenter via multiple vCenter definitions in the cloud provider configuration. So technically you could have a K8s cluster with each of its control plane nodes in different datacenters as long as each datacenter had symmetrical pool/datastore/folder structures.
| devices: | ||
| description: Devices is the list of network devices used by the virtual | ||
| machine. | ||
| machine. TODO(akutz) Make sure at least one network matches the ClusterSpec.CloudProviderConfiguration.Network.Name |
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 the extra space?
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.
That can be addressed in a future PR/patch. Thanks!
| package cloud | ||
|
|
||
| // Config is the vSphere cloud provider's configuration. | ||
| type Config struct { |
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 probably already been discussed: what is the plan to keep in-sync with cloud provider types?
is vendor-in types from cloud provider repo in the long term plan? thanks
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.
That's correct. On both counts. Eventually these types will move into the CCM codebase.
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.
Can you open an issue in the CCM repo for this?
|
/lgtm |
|
/lgtm |
|
Sorry I'm a bit late to the party, but this LGTM! |
…to-maintainer Add lubronzhan to the maintainer list
What this PR does / why we need it:
Introduces support for a centralized cloud provider configuration
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 #60
Special notes for your reviewer:
Please see #314 (comment) for more information.
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: