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

pkg/asset/machines/libvirt: allow empty machinepool #601

Merged
merged 1 commit into from
Nov 2, 2018
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion pkg/asset/machines/libvirt/machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ func Machines(config *types.InstallConfig, pool *types.MachinePool, role, userDa
if configPlatform := config.Platform.Name(); configPlatform != types.PlatformNameLibvirt {
return nil, fmt.Errorf("non-Libvirt configuration: %q", configPlatform)
}
if poolPlatform := pool.Platform.Name(); poolPlatform != types.PlatformNameLibvirt {
// FIXME: empty is a valid case for Libvirt as we don't use it.
if poolPlatform := pool.Platform.Name(); poolPlatform != "" && poolPlatform != types.PlatformNameLibvirt {
return nil, fmt.Errorf("non-Libvirt machine-pool: %q", poolPlatform)
}
clustername := config.ObjectMeta.Name
Expand Down
3 changes: 2 additions & 1 deletion pkg/asset/machines/libvirt/machinesets.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ func MachineSets(config *types.InstallConfig, pool *types.MachinePool, role, use
if configPlatform := config.Platform.Name(); configPlatform != types.PlatformNameLibvirt {
return nil, fmt.Errorf("non-Libvirt configuration: %q", configPlatform)
}
if poolPlatform := pool.Platform.Name(); poolPlatform != types.PlatformNameLibvirt {
// FIXME: empty is a valid case for Libvirt as we don't use it.
if poolPlatform := pool.Platform.Name(); poolPlatform != "" && poolPlatform != types.PlatformNameLibvirt {
return nil, fmt.Errorf("non-Libvirt machine-pool: %q", poolPlatform)
}
clustername := config.ObjectMeta.Name
Expand Down