diff --git a/api/v1alpha1/cosmosdb_types.go b/api/v1alpha1/cosmosdb_types.go index 77f835e9a70..b74e1504abe 100644 --- a/api/v1alpha1/cosmosdb_types.go +++ b/api/v1alpha1/cosmosdb_types.go @@ -69,7 +69,7 @@ const ( // CosmosDBLocation defines one or more locations for geo-redundancy and high availability type CosmosDBLocation struct { - LocationName string `json:"locationName,omitempty"` + LocationName string `json:"locationName"` FailoverPriority int32 `json:"failoverPriority"` IsZoneRedundant bool `json:"isZoneRedundant,omitempty"` } diff --git a/pkg/resourcemanager/cosmosdbs/cosmosdb_reconcile.go b/pkg/resourcemanager/cosmosdbs/cosmosdb_reconcile.go index 32149196aa5..b0ec43081b3 100644 --- a/pkg/resourcemanager/cosmosdbs/cosmosdb_reconcile.go +++ b/pkg/resourcemanager/cosmosdbs/cosmosdb_reconcile.go @@ -199,7 +199,8 @@ func (m *AzureCosmosDBManager) Delete(ctx context.Context, obj runtime.Object, o errhelp.ResourceGroupNotFoundErrorCode, } if helpers.ContainsString(notFound, azerr.Type) { - return false, m.deleteSecret(ctx, instance) + _ = m.deleteSecret(ctx, instance) + return false, nil } // unhandled error @@ -207,7 +208,8 @@ func (m *AzureCosmosDBManager) Delete(ctx context.Context, obj runtime.Object, o return false, err } - return false, m.deleteSecret(ctx, instance) + _ = m.deleteSecret(ctx, instance) + return false, nil } // GetParents returns the parents of cosmosdb