Skip to content

Commit

Permalink
azurepathfix: continue reconciliation when storage isn't configured
Browse files Browse the repository at this point in the history
remove early return when .status.storage.azure is unset. this property
is cleared up when the operator managementState is set to Removed, and
in such cases the early return would stop the controller from clearing
up the conditions and deleting the job. without this check the
controller can still do its job, even when managementState is Removed.
  • Loading branch information
flavianmissi authored and openshift-cherrypick-robot committed Nov 26, 2024
1 parent 92d64a7 commit 6918d4f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions pkg/operator/azurepathfixcontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,10 @@ func (c *AzurePathFixController) sync() error {
return err
}

azureStorage := imageRegistryConfig.Status.Storage.Azure
if azureStorage == nil || len(azureStorage.AccountName) == 0 {
return fmt.Errorf("storage account not yet provisioned")
}
if azureStorage == nil || len(azureStorage.Container) == 0 {
return fmt.Errorf("storage container not yet provisioned")
}

// the move-blobs cmd does not work on Azure Stack Hub. Users on ASH
// will have to copy the blobs on their own using something like az copy.
if strings.EqualFold(azureStorage.CloudName, "AZURESTACKCLOUD") {
azureStorage := imageRegistryConfig.Status.Storage.Azure
if azureStorage != nil && strings.EqualFold(azureStorage.CloudName, "AZURESTACKCLOUD") {
return nil
}

Expand Down

0 comments on commit 6918d4f

Please sign in to comment.