diff --git a/pkg/asset/manifests/tectonic.go b/pkg/asset/manifests/tectonic.go index 1dd1c8feb4c..e077403740e 100644 --- a/pkg/asset/manifests/tectonic.go +++ b/pkg/asset/manifests/tectonic.go @@ -11,6 +11,7 @@ import ( "github.com/ghodss/yaml" "github.com/pkg/errors" + "github.com/gophercloud/utils/openstack/clientconfig" "github.com/openshift/installer/pkg/asset" "github.com/openshift/installer/pkg/asset/installconfig" "github.com/openshift/installer/pkg/asset/machines" @@ -20,7 +21,6 @@ import ( const ( tectonicManifestDir = "tectonic" - openStackCredsFile = "/etc/openstack/clouds.yaml" ) var ( @@ -80,10 +80,17 @@ func (t *Tectonic) Generate(dependencies asset.Parents) error { }, } case "openstack": - credsEncoded, err := credsFileEncode(openStackCredsFile) + clouds, err := clientconfig.LoadCloudsYAML() if err != nil { return err } + + marshalled, err := yaml.Marshal(clouds) + if err != nil { + return err + } + + credsEncoded := base64.StdEncoding.EncodeToString(marshalled) cloudCreds = cloudCredsSecretData{ OpenStack: &OpenStackCredsSecretData{ Base64encodeCloudCreds: credsEncoded,