-
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
Merged
k8s-ci-robot
merged 7 commits into
kubernetes-sigs:master
from
akutz:feature/cloud-provider-config
Aug 8, 2019
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8088602
Support for dedicated cloud provider config
akutz 6c61c0e
Remove field tags for "ini" package
akutz 6fea97f
Use reflection to marshal cloud provider config
akutz 526b477
Implement gcfg omitempty
akutz f6106cf
Update YAML tpls, docs for new cloud provider conf
akutz a4c97f8
Fix default-datastore bug in cloud conf
akutz 62fa84c
Centralize dstore/pool/folder in CCM config
akutz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,24 +23,12 @@ spec: | |
| description: Datacenter is the name or inventory path of the datacenter | ||
| where this machine's VM is created/located. | ||
| type: string | ||
| datastore: | ||
| description: Datastore is the name or inventory path of the datastore where | ||
| this machine's VM is created/located. When omitted, GoVmomi's DatastoreOrDefault | ||
| method is used to determine the default datastore. It is recommended to | ||
| explicitly set this value. | ||
| type: string | ||
| diskGiB: | ||
| description: DiskGiB is the size of a virtual machine's disk, in GiB. Defaults | ||
| to the analogue property value in the template from which this machine | ||
| is cloned. | ||
| format: int32 | ||
| type: integer | ||
| folder: | ||
| description: Folder is the name or inventory path of the folder where this | ||
| machine's VM is created/located. When omitted, GoVmomi's FolderOrDefault | ||
| method is used to determine the default folder. It is recommended to explicitly | ||
| set this value. | ||
| type: string | ||
| kind: | ||
| description: 'Kind is a string value representing the REST resource this | ||
| object represents. Servers may infer this from the endpoint the client | ||
|
|
@@ -342,7 +330,7 @@ spec: | |
| properties: | ||
| 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove the extra space?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That can be addressed in a future PR/patch. Thanks! |
||
| items: | ||
| properties: | ||
| dhcp4: | ||
|
|
@@ -469,12 +457,6 @@ spec: | |
| template from which this machine is cloned. | ||
| format: int32 | ||
| type: integer | ||
| resourcePool: | ||
| description: ResourcePool is the name or inventory path of the resource | ||
| pool where this machine's VM is created/located. When omitted, GoVmomi's | ||
| ResourcePoolOrDefault method is used to determine the default resource | ||
| pool. It is recommended to explicitly set this value. | ||
| type: string | ||
| template: | ||
| description: Template is the name, inventory path, or instance UUID of the | ||
| template used to clone new machines. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /* | ||
| Copyright 2019 The Kubernetes Authors. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| // Package cloud contains API types for the vSphere cloud provider. | ||
| // | ||
| // The configuration may be unmarshalled from an INI-style configuration using | ||
| // the "gopkg.in/gcfg.v1" package. | ||
| // | ||
| // The configuration may be marshalled to an INI-style configuraton using a Go | ||
| // template. | ||
| // | ||
| // The "gopkg.in/go-ini/ini.v1" package was investigated, but it does not | ||
| // support reflecting a struct with a field of type "map[string]TYPE" to INI. | ||
| // | ||
| // +k8s:deepcopy-gen=package | ||
| package cloud |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
datacenterkept 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.