diff --git a/api/v1alpha1/eventhub_types.go b/api/v1alpha1/eventhub_types.go index 9ec9a14472d..d2c07a7175a 100644 --- a/api/v1alpha1/eventhub_types.go +++ b/api/v1alpha1/eventhub_types.go @@ -54,8 +54,8 @@ type Destination struct { // Name - Name for capture destination // +kubebuilder:validation:Enum=EventHubArchive.AzureBlockBlob;EventHubArchive.AzureDataLake Name string `json:"name,omitempty"` - // EventHubStorageAccount - Details of the storage account - EventHubStorageAccount EventHubStorageAccount `json:"eventHubStorageAccount,omitempty"` + // StorageAccount - Details of the storage account + StorageAccount EventHubStorageAccount `json:"storageAccount,omitempty"` } //CaptureDescription defines the properties required for eventhub capture diff --git a/api/v1alpha1/eventhub_types_test.go b/api/v1alpha1/eventhub_types_test.go index af06cf0329a..aec8dcb9fb8 100644 --- a/api/v1alpha1/eventhub_types_test.go +++ b/api/v1alpha1/eventhub_types_test.go @@ -86,7 +86,7 @@ var _ = Describe("Eventhub", func() { ArchiveNameFormat: "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}", BlobContainer: "foo-blob-container", Name: "EventHubArchive.AzureBlockBlob", - EventHubStorageAccount: EventHubStorageAccount{ + StorageAccount: EventHubStorageAccount{ ResourceGroup: "foo-resource-group", AccountName: "fooaccountname", }, diff --git a/controllers/eventhub_controller_test.go b/controllers/eventhub_controller_test.go index a68109680f4..3e2597eee1b 100644 --- a/controllers/eventhub_controller_test.go +++ b/controllers/eventhub_controller_test.go @@ -267,7 +267,7 @@ func TestEventHubControllerCreateAndDeleteCapture(t *testing.T) { ArchiveNameFormat: "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}", BlobContainer: bcName, Name: "EventHubArchive.AzureBlockBlob", - EventHubStorageAccount: azurev1alpha1.EventHubStorageAccount{ + StorageAccount: azurev1alpha1.EventHubStorageAccount{ ResourceGroup: rgName, AccountName: saName, }, diff --git a/pkg/resourcemanager/eventhubs/hub.go b/pkg/resourcemanager/eventhubs/hub.go index 723376595c4..a789f1f91cf 100644 --- a/pkg/resourcemanager/eventhubs/hub.go +++ b/pkg/resourcemanager/eventhubs/hub.go @@ -383,7 +383,7 @@ func getCaptureDescriptionPtr(captureDescription azurev1alpha1.CaptureDescriptio // add capture details var capturePtr *model.CaptureDescription - storage := captureDescription.Destination.EventHubStorageAccount + storage := captureDescription.Destination.StorageAccount storageAccountResourceID := fmt.Sprintf(storageAccountResourceFmt, config.SubscriptionID(), storage.ResourceGroup, storage.AccountName) if captureDescription.Enabled { diff --git a/pkg/resourcemanager/mock/eventhubs/hub.go b/pkg/resourcemanager/mock/eventhubs/hub.go index 71f236e0132..75b711679d1 100644 --- a/pkg/resourcemanager/mock/eventhubs/hub.go +++ b/pkg/resourcemanager/mock/eventhubs/hub.go @@ -260,7 +260,7 @@ func getCaptureDescriptionPtr(captureDescription azurev1alpha1.CaptureDescriptio // add capture details var capturePtr *eventhub.CaptureDescription - storage := captureDescription.Destination.EventHubStorageAccount + storage := captureDescription.Destination.StorageAccount storageAccountResourceID := fmt.Sprintf(storageAccountResourceFmt, config.SubscriptionID(), storage.ResourceGroup, storage.AccountName) if captureDescription.Enabled {