Skip to content

Commit

Permalink
asset/installconfig/platformprovisioncheck.go: check for api dns reco…
Browse files Browse the repository at this point in the history
…rd before creating cluster
  • Loading branch information
abhinavdahiya committed May 14, 2020
1 parent 311a2e9 commit ed69403
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pkg/asset/installconfig/platformprovisioncheck.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package installconfig

import (
"context"
"fmt"

"github.com/openshift/installer/pkg/asset"
azconfig "github.com/openshift/installer/pkg/asset/installconfig/azure"
gcpconfig "github.com/openshift/installer/pkg/asset/installconfig/gcp"
vsconfig "github.com/openshift/installer/pkg/asset/installconfig/vsphere"
"github.com/openshift/installer/pkg/types/aws"
"github.com/openshift/installer/pkg/types/azure"
Expand Down Expand Up @@ -49,7 +51,16 @@ func (a *PlatformProvisionCheck) Generate(dependencies asset.Parents) error {
if err != nil {
return err
}
case aws.Name, baremetal.Name, gcp.Name, libvirt.Name, none.Name, openstack.Name, ovirt.Name:
case gcp.Name:
client, err := gcpconfig.NewClient(context.TODO())
if err != nil {
return err
}
err = gcpconfig.ValidatePreExitingPublicDNS(client, ic.Config)
if err != nil {
return err
}
case aws.Name, baremetal.Name, libvirt.Name, none.Name, openstack.Name, ovirt.Name:
// no special provisioning requirements to check
default:
err = fmt.Errorf("unknown platform type %q", platform)
Expand Down

0 comments on commit ed69403

Please sign in to comment.