Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jananivMS committed Mar 31, 2020
1 parent 399823e commit 919ed29
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
18 changes: 9 additions & 9 deletions config/samples/azure_v1alpha1_eventhubnamespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ spec:
isAutoInflateEnabled: false
maximumThroughputUnits: 0
kafkaEnabled: false
#networkRule is only supported on "Standard" tier namespace
networkRule:
defaultAction: deny
virtualNetworkRules:
- subnetId: /subscriptions/{subscription_id}/resourceGroups/{resourcegroup}/providers/Microsoft.Network/virtualNetworks/{vnet_name}/subnets/{subnet_name}
ignoreMissingServiceEndpoint: true
ipRules:
- ipMask: 1.1.1.1
- ipMask: 2.2.0.0/24
#Optional: networkRule is only supported on "Standard" tier namespace
# networkRule:
# defaultAction: deny
# virtualNetworkRules:
# - subnetId: /subscriptions/{subscription_id}/resourceGroups/{resourcegroup}/providers/Microsoft.Network/virtualNetworks/{vnet_name}/subnets/{subnet_name}
# ignoreMissingServiceEndpoint: true
# ipRules:
# - ipMask: 1.1.1.1
# - ipMask: 2.2.0.0/24
16 changes: 4 additions & 12 deletions pkg/resourcemanager/eventhubs/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,22 +116,14 @@ func (_ *azureEventHubNamespaceManager) CreateNamespace(ctx context.Context, res
namespaceSku.Capacity = &sku.Capacity
}

switch strings.ToLower(sku.Name) {
case "basic":
namespaceSku.Name = eventhub.Standard
if strings.ToLower(sku.Name) == "basic" {
namespaceSku.Name = eventhub.Basic
case "standard":
namespaceSku.Name = eventhub.Standard
default:
namespaceSku.Name = eventhub.Standard
}

switch strings.ToLower(sku.Tier) {
case "basic":
namespaceSku.Tier = eventhub.SkuTierStandard
if strings.ToLower(sku.Tier) == "basic" {
namespaceSku.Tier = eventhub.SkuTierBasic
case "standard":
namespaceSku.Tier = eventhub.SkuTierStandard
default:
namespaceSku.Tier = eventhub.SkuTierStandard
}

namespaceProperties := eventhub.EHNamespaceProperties{}
Expand Down

0 comments on commit 919ed29

Please sign in to comment.