Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into issue#858
  • Loading branch information
buhongw7583c committed Apr 8, 2020
2 parents 12c04f3 + d5ef4cd commit c15eaba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions pkg/errhelp/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const (
SecretNotFound = "SecretNotFound"
RequestDisallowedByPolicy = "RequestDisallowedByPolicy"
ServiceBusy = "ServiceBusy"
NameNotAvailable = "NameNotAvailable"
)

func NewAzureError(err error) error {
Expand Down
1 change: 1 addition & 0 deletions pkg/resourcemanager/rediscaches/rediscache_reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func (rc *AzureRedisCacheManager) Ensure(ctx context.Context, obj runtime.Object
errhelp.ParentNotFoundErrorCode,
errhelp.ResourceGroupNotFoundErrorCode,
errhelp.NotFoundErrorCode,
errhelp.NameNotAvailable,
}

// handle the error
Expand Down
7 changes: 2 additions & 5 deletions pkg/resourcemanager/rediscaches/rediscaches.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis"
model "github.com/Azure/azure-sdk-for-go/services/redis/mgmt/2018-03-01/redis"
azurev1alpha1 "github.com/Azure/azure-service-operator/api/v1alpha1"
"github.com/Azure/azure-service-operator/pkg/helpers"
"github.com/Azure/azure-service-operator/pkg/resourcemanager/config"
"github.com/Azure/azure-service-operator/pkg/resourcemanager/iam"
"github.com/Azure/azure-service-operator/pkg/secrets"
Expand Down Expand Up @@ -54,11 +55,7 @@ func (r *AzureRedisCacheManager) CreateRedisCache(
props := instance.Spec.Properties

// convert kube labels to expected tag format
tags := map[string]*string{}
for k, v := range instance.GetLabels() {
value := v
tags[k] = &value
}
tags := helpers.LabelsToTags(instance.GetLabels())

redisClient, err := getRedisCacheClient()
if err != nil {
Expand Down

0 comments on commit c15eaba

Please sign in to comment.