Skip to content
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
8 changes: 4 additions & 4 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 10 additions & 7 deletions pkg/asset/manifests/infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,31 @@ func (*Infrastructure) Name() string {
// the asset.
func (*Infrastructure) Dependencies() []asset.Asset {
return []asset.Asset{
&installconfig.ClusterID{},
&installconfig.InstallConfig{},
}
}

// Generate generates the Infrastructure config and its CRD.
func (i *Infrastructure) Generate(dependencies asset.Parents) error {
clusterID := &installconfig.ClusterID{}
installConfig := &installconfig.InstallConfig{}
dependencies.Get(installConfig)
dependencies.Get(clusterID, installConfig)

var platform configv1.PlatformType
switch installConfig.Config.Platform.Name() {
case aws.Name:
platform = configv1.AWSPlatform
platform = configv1.AWSPlatformType
case none.Name:
platform = configv1.NonePlatform
platform = configv1.NonePlatformType
case libvirt.Name:
platform = configv1.LibvirtPlatform
platform = configv1.LibvirtPlatformType
case openstack.Name:
platform = configv1.OpenStackPlatform
platform = configv1.OpenStackPlatformType
case vsphere.Name:
platform = configv1.VSpherePlatform
platform = configv1.VSpherePlatformType
default:
platform = configv1.NonePlatform
platform = configv1.NonePlatformType
}

config := &configv1.Infrastructure{
Expand All @@ -74,6 +76,7 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error {
// not namespaced
},
Status: configv1.InfrastructureStatus{
InfrastructureName: clusterID.InfraID,
Platform: platform,
APIServerURL: getAPIServerURL(installConfig.Config),
EtcdDiscoveryDomain: getEtcdDiscoveryDomain(installConfig.Config),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading