Skip to content

Commit

Permalink
improve message output for storage account and comment optional vals …
Browse files Browse the repository at this point in the history
…in sample
  • Loading branch information
frodopwns committed Apr 20, 2020
1 parent 5b9018f commit 67fabde
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
16 changes: 8 additions & 8 deletions config/samples/azure_v1alpha1_storageaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 67fabde

Please sign in to comment.