зеркало из https://github.com/Azure/ARO-RP.git
use OpenShiftCluster instead of OpenShiftClusterDocument where possible in pkg/install
This commit is contained in:
Родитель
6420c083db
Коммит
e4f9ddd703
|
@ -205,7 +205,7 @@ func (i *Installer) installStorage(ctx context.Context, doc *api.OpenShiftCluste
|
|||
}
|
||||
|
||||
{
|
||||
blobService, err := i.getBlobService(ctx, doc)
|
||||
blobService, err := i.getBlobService(ctx, doc.OpenShiftCluster)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import (
|
|||
)
|
||||
|
||||
func (i *Installer) installResources(ctx context.Context, doc *api.OpenShiftClusterDocument) error {
|
||||
g, err := i.getGraph(ctx, doc)
|
||||
g, err := i.getGraph(ctx, doc.OpenShiftCluster)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import (
|
|||
)
|
||||
|
||||
func (i *Installer) removeBootstrap(ctx context.Context, doc *api.OpenShiftClusterDocument) error {
|
||||
g, err := i.getGraph(ctx, doc)
|
||||
g, err := i.getGraph(ctx, doc.OpenShiftCluster)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -118,13 +118,13 @@ func (i *Installer) Install(ctx context.Context, doc *api.OpenShiftClusterDocume
|
|||
}
|
||||
}
|
||||
|
||||
func (i *Installer) getBlobService(ctx context.Context, doc *api.OpenShiftClusterDocument) (azstorage.BlobStorageClient, error) {
|
||||
keys, err := i.accounts.ListKeys(ctx, doc.OpenShiftCluster.Properties.ResourceGroup, "cluster"+doc.OpenShiftCluster.Properties.StorageSuffix, "")
|
||||
func (i *Installer) getBlobService(ctx context.Context, oc *api.OpenShiftCluster) (azstorage.BlobStorageClient, error) {
|
||||
keys, err := i.accounts.ListKeys(ctx, oc.Properties.ResourceGroup, "cluster"+oc.Properties.StorageSuffix, "")
|
||||
if err != nil {
|
||||
return azstorage.BlobStorageClient{}, err
|
||||
}
|
||||
|
||||
storage, err := azstorage.NewClient("cluster"+doc.OpenShiftCluster.Properties.StorageSuffix, *(*keys.Keys)[0].Value, azstorage.DefaultBaseURL, azstorage.DefaultAPIVersion, true)
|
||||
storage, err := azstorage.NewClient("cluster"+oc.Properties.StorageSuffix, *(*keys.Keys)[0].Value, azstorage.DefaultBaseURL, azstorage.DefaultAPIVersion, true)
|
||||
if err != nil {
|
||||
return azstorage.BlobStorageClient{}, err
|
||||
}
|
||||
|
@ -132,10 +132,10 @@ func (i *Installer) getBlobService(ctx context.Context, doc *api.OpenShiftCluste
|
|||
return storage.GetBlobService(), nil
|
||||
}
|
||||
|
||||
func (i *Installer) getGraph(ctx context.Context, doc *api.OpenShiftClusterDocument) (graph, error) {
|
||||
func (i *Installer) getGraph(ctx context.Context, oc *api.OpenShiftCluster) (graph, error) {
|
||||
i.log.Print("retrieving graph")
|
||||
|
||||
blobService, err := i.getBlobService(ctx, doc)
|
||||
blobService, err := i.getBlobService(ctx, oc)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче