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 cloudConfig to generated config examples #1062

Merged
merged 3 commits into from
Aug 22, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pkg/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,11 @@ func runPrint(printOptions *printOpts) error {
case "digitalocean", "packet", "hetzner":
printOptions.CloudProviderExternal = true
case "openstack":
printOptions.CloudProviderCloudCfg = "<< cloudConfig is required for OpenStack >>"
printOptions.CloudProviderCloudCfg = "<< cloudConfig is required for OpenStack >>\n"
case "vsphere":
printOptions.CloudProviderCloudCfg = "<< cloudConfig is required for vSphere >>\n"
case "azure":
printOptions.CloudProviderCloudCfg = "<< cloudConfig is required for Azure >>\n"
}

tmpl, err := template.New("example-manifest").Parse(exampleManifest)
Expand Down Expand Up @@ -288,6 +292,7 @@ func createAndPrintManifest(printOptions *printOpts) error {
cfg.Set(yamled.Path{"cloudProvider", "aws"}, providerVal)
case "azure":
cfg.Set(yamled.Path{"cloudProvider", "azure"}, providerVal)
cfg.Set(yamled.Path{"cloudProvider", "cloudConfig"}, "<< cloudConfig is required for Azure >>\n")
case "digitalocean":
cfg.Set(yamled.Path{"cloudProvider", "digitalocean"}, providerVal)
cfg.Set(yamled.Path{"cloudProvider", "external"}, true)
Expand All @@ -298,12 +303,13 @@ func createAndPrintManifest(printOptions *printOpts) error {
cfg.Set(yamled.Path{"cloudProvider", "external"}, true)
case "openstack":
cfg.Set(yamled.Path{"cloudProvider", "openstack"}, providerVal)
cfg.Set(yamled.Path{"cloudProvider", "cloudConfig"}, "<< cloudConfig is required for OpenStack >>")
cfg.Set(yamled.Path{"cloudProvider", "cloudConfig"}, "<< cloudConfig is required for OpenStack >>\n")
case "packet":
cfg.Set(yamled.Path{"cloudProvider", "packet"}, providerVal)
cfg.Set(yamled.Path{"cloudProvider", "external"}, true)
case "vsphere":
cfg.Set(yamled.Path{"cloudProvider", "vsphere"}, providerVal)
cfg.Set(yamled.Path{"cloudProvider", "cloudConfig"}, "<< cloudConfig is required for vSphere >>\n")
case "none":
cfg.Set(yamled.Path{"cloudProvider", "none"}, providerVal)
}
Expand Down