Skip to content

Commit

Permalink
Only marshal the cloud configs used to deploy openshift
Browse files Browse the repository at this point in the history
  • Loading branch information
flaper87 committed Dec 13, 2018
1 parent 9e3cac0 commit 7d7cdce
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions pkg/asset/manifests/openshift.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ import (
"path/filepath"

"github.com/aws/aws-sdk-go/aws/session"
"github.com/ghodss/yaml"

// TODO(flaper87): Migrate to ghodss asap
// This yaml is currently used only by the OpenStack
// clouds serialization. We're working on migrating
// clientconfig out of go-yaml. We'll use it here
// until that happens.
// https://github.com/openshift/installer/pull/854
"gopkg.in/yaml.v2"

"github.com/gophercloud/utils/openstack/clientconfig"
"github.com/openshift/installer/pkg/asset"
Expand Down Expand Up @@ -76,10 +83,15 @@ func (o *Openshift) Generate(dependencies asset.Parents) error {
},
}
case "openstack":
clouds, err := clientconfig.LoadCloudsYAML()
opts := new(clientconfig.ClientOpts)
cloud, err := clientconfig.GetCloudFromYAML(opts)
if err != nil {
return err
}
clouds := make(map[string]map[string]*clientconfig.Cloud)
clouds["clouds"] = map[string]*clientconfig.Cloud{
"openstack": cloud,
}

marshalled, err := yaml.Marshal(clouds)
if err != nil {
Expand Down

0 comments on commit 7d7cdce

Please sign in to comment.