A Kubernetes operator that bridges Hardware Security Module (HSM) data storage with Kubernetes Secrets, providing true secret portability th
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix mirroring again

+13 -9
+13 -9
internal/mirror/manager.go
··· 622 622 deviceNames := make(map[string]bool) 623 623 624 624 for _, pool := range hsmPoolList.Items { 625 - if pool.Status.Phase == hsmv1alpha1.HSMPoolPhaseReady { 626 - // Count actual aggregated physical devices, not just device references 627 - for i, aggregatedDevice := range pool.Status.AggregatedDevices { 628 - if aggregatedDevice.Available { 629 - // Create unique device name for each physical device instance 630 - // This matches the agent naming scheme: deviceRef-i 631 - for _, deviceRef := range pool.Spec.HSMDeviceRefs { 632 - physicalDeviceName := fmt.Sprintf("%s-%d", deviceRef, i) 633 - deviceNames[physicalDeviceName] = true 625 + if pool.Status.Phase == hsmv1alpha1.HSMPoolPhaseReady && len(pool.Status.AggregatedDevices) > 0 { 626 + // Use the actual HSMDevice names from the pool spec 627 + // AgentManager will handle connecting to the appropriate agent instances 628 + for _, deviceRef := range pool.Spec.HSMDeviceRefs { 629 + // Only add if there are available devices in this pool 630 + hasAvailableDevice := false 631 + for _, aggregatedDevice := range pool.Status.AggregatedDevices { 632 + if aggregatedDevice.Available { 633 + hasAvailableDevice = true 634 + break 634 635 } 636 + } 637 + if hasAvailableDevice { 638 + deviceNames[deviceRef] = true 635 639 } 636 640 } 637 641 }