Skip to content

Commit 97a3d21

Browse files
committed
azurepathfix: continue reconciliation when storage isn't configured
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.
1 parent 92d64a7 commit 97a3d21

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

pkg/operator/azurepathfixcontroller.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,17 +178,10 @@ func (c *AzurePathFixController) sync() error {
178178
return err
179179
}
180180

181-
azureStorage := imageRegistryConfig.Status.Storage.Azure
182-
if azureStorage == nil || len(azureStorage.AccountName) == 0 {
183-
return fmt.Errorf("storage account not yet provisioned")
184-
}
185-
if azureStorage == nil || len(azureStorage.Container) == 0 {
186-
return fmt.Errorf("storage container not yet provisioned")
187-
}
188-
189181
// the move-blobs cmd does not work on Azure Stack Hub. Users on ASH
190182
// will have to copy the blobs on their own using something like az copy.
191-
if strings.EqualFold(azureStorage.CloudName, "AZURESTACKCLOUD") {
183+
azureStorage := imageRegistryConfig.Status.Storage.Azure
184+
if azureStorage != nil && strings.EqualFold(azureStorage.CloudName, "AZURESTACKCLOUD") {
192185
return nil
193186
}
194187

0 commit comments

Comments
 (0)