@@ -30,10 +30,6 @@ import (
3030 azuretypes "github.com/openshift/installer/pkg/types/azure"
3131)
3232
33- const (
34- manifestDir = "cluster-api"
35- )
36-
3733var _ asset.WritableRuntimeAsset = (* Cluster )(nil )
3834
3935// Cluster generates manifests for target cluster
@@ -77,7 +73,7 @@ func (c *Cluster) Generate(dependencies asset.Parents) error {
7773 return nil
7874 }
7975
80- if err := os .MkdirAll (filepath .Dir (manifestDir ), 0755 ); err != nil {
76+ if err := os .MkdirAll (filepath .Dir (capiutils . ManifestDir ), 0755 ); err != nil {
8177 return err
8278 }
8379
@@ -188,11 +184,11 @@ func (c *Cluster) Generate(dependencies asset.Parents) error {
188184 }
189185 m .Data = objData
190186
191- // If the filename is already a path, do not append the manifestDir .
192- if filepath .Dir (m .Filename ) == manifestDir {
187+ // If the filename is already a path, do not append the manifest dir .
188+ if filepath .Dir (m .Filename ) == capiutils . ManifestDir {
193189 continue
194190 }
195- m .Filename = filepath .Join (manifestDir , m .Filename )
191+ m .Filename = filepath .Join (capiutils . ManifestDir , m .Filename )
196192 }
197193
198194 asset .SortManifestFiles (c .FileList )
@@ -215,15 +211,15 @@ func (c *Cluster) RuntimeFiles() []*asset.RuntimeFile {
215211
216212// Load returns the openshift asset from disk.
217213func (c * Cluster ) Load (f asset.FileFetcher ) (bool , error ) {
218- yamlFileList , err := f .FetchByPattern (filepath .Join (manifestDir , "*.yaml" ))
214+ yamlFileList , err := f .FetchByPattern (filepath .Join (capiutils . ManifestDir , "*.yaml" ))
219215 if err != nil {
220216 return false , errors .Wrap (err , "failed to load *.yaml files" )
221217 }
222- ymlFileList , err := f .FetchByPattern (filepath .Join (manifestDir , "*.yml" ))
218+ ymlFileList , err := f .FetchByPattern (filepath .Join (capiutils . ManifestDir , "*.yml" ))
223219 if err != nil {
224220 return false , errors .Wrap (err , "failed to load *.yml files" )
225221 }
226- jsonFileList , err := f .FetchByPattern (filepath .Join (manifestDir , "*.json" ))
222+ jsonFileList , err := f .FetchByPattern (filepath .Join (capiutils . ManifestDir , "*.json" ))
227223 if err != nil {
228224 return false , errors .Wrap (err , "failed to load *.json files" )
229225 }
0 commit comments