diff --git a/config/samples/azure_v1alpha1_storageaccount.yaml b/config/samples/azure_v1alpha1_storageaccount.yaml index 39b590fe276..29cd0fe5cdf 100644 --- a/config/samples/azure_v1alpha1_storageaccount.yaml +++ b/config/samples/azure_v1alpha1_storageaccount.yaml @@ -11,11 +11,11 @@ spec: accessTier: Hot supportsHttpsTrafficOnly: true # Optional: networkRule - networkRule: - bypass: AzureServices # Possible values are AzureServices, Metrics, None, Logging - defaultAction: Deny # Possible values are Allow, Deny - virtualNetworkRules: - - subnetId: /subscriptions/{subscription}/resourceGroups/{resourcegroup}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet} - ipRules: #could be an ip range or a ip address - - ipAddressOrRange: 2.2.0.0/24 - - ipAddressOrRange: 2.2.2.1 + # networkRule: + # bypass: AzureServices # Possible values are AzureServices, Metrics, None, Logging + # defaultAction: Deny # Possible values are Allow, Deny + # virtualNetworkRules: + # - subnetId: /subscriptions/{subscription}/resourceGroups/{resourcegroup}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet} + # ipRules: #could be an ip range or a ip address + # - ipAddressOrRange: 2.2.0.0/24 + # - ipAddressOrRange: 2.2.2.1 diff --git a/pkg/resourcemanager/storages/storageaccount/storageaccount_reconcile.go b/pkg/resourcemanager/storages/storageaccount/storageaccount_reconcile.go index 45efda9e48c..b21e2e2b682 100644 --- a/pkg/resourcemanager/storages/storageaccount/storageaccount_reconcile.go +++ b/pkg/resourcemanager/storages/storageaccount/storageaccount_reconcile.go @@ -42,11 +42,7 @@ func (sa *azureStorageManager) Ensure(ctx context.Context, obj runtime.Object, o networkAcls = ParseNetworkPolicy(instance.Spec.NetworkRule) } // convert kube labels to expected tag format - labels := map[string]*string{} - for k, v := range instance.GetLabels() { - value := v - labels[k] = &value - } + labels := helpers.LabelsToTags(instance.GetLabels()) hash := "" stor, err := sa.GetStorage(ctx, groupName, name) @@ -132,6 +128,8 @@ func (sa *azureStorageManager) Ensure(ctx context.Context, obj runtime.Object, o instance.Status.Message = "Storage Account Already exists somewhere else" return true, nil } + + instance.Status.Message = "Storage Account already exists and should be available shortly" instance.Status.Provisioning = true }