···33# To re-generate a bundle for another specific version without changing the standard setup, you can:
44# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
55# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
66-VERSION ?= 0.5.24
66+VERSION ?= 0.5.25
7788# CHANNELS define the bundle channels used in the bundle.
99# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
+2-2
helm/hsm-secrets-operator/Chart.yaml
···22name: hsm-secrets-operator
33description: A Kubernetes operator that bridges Pico HSM binary data storage with Kubernetes Secrets
44type: application
55-version: 0.5.24
66-appVersion: v0.5.24
55+version: 0.5.25
66+appVersion: v0.5.25
77icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/kubernetes/icon/color/kubernetes-icon-color.svg
88home: https://github.com/evanjarrett/hsm-secrets-operator
99sources:
···45454646 // DefaultSyncInterval is the default sync interval in seconds
4747 DefaultSyncInterval = 30
4848+4949+ // StartupGracePeriod is the duration during which "no agents available" is logged at Info level
5050+ StartupGracePeriod = 2 * time.Minute
4851)
49525053// HSMSecretReconciler reconciles a HSMSecret object
···5457 AgentManager *agent.Manager
5558 OperatorNamespace string
5659 OperatorName string
6060+ StartupTime time.Time
5761}
58625963// HSMDeviceClients holds multiple HSM devices and their clients
···139143 // Find available devices via AgentManager
140144 devices, err := r.AgentManager.GetAvailableDevices(ctx, r.OperatorNamespace)
141145 if err != nil {
142142- logger.Error(err, "Failed to get available devices")
146146+ // During startup grace period, log at Info level to reduce noise
147147+ if time.Since(r.StartupTime) < StartupGracePeriod {
148148+ logger.Info("No HSM agents available yet (startup grace period)", "error", err.Error(), "elapsed", time.Since(r.StartupTime).Round(time.Second))
149149+ } else {
150150+ logger.Error(err, "Failed to get available devices")
151151+ }
143152 return ctrl.Result{RequeueAfter: time.Minute * 2}, nil
144153 }
145154 if len(devices) == 0 {
146146- logger.Info("No HSM devices available")
155155+ // During startup grace period, log at Info level to reduce noise
156156+ if time.Since(r.StartupTime) < StartupGracePeriod {
157157+ logger.Info("No HSM devices available yet (startup grace period)", "elapsed", time.Since(r.StartupTime).Round(time.Second))
158158+ } else {
159159+ logger.Info("No HSM devices available")
160160+ }
147161 return ctrl.Result{RequeueAfter: time.Minute * 2}, nil
148162 }
149163
+7-7
internal/mirror/manager.go
···611611 return nil
612612}
613613614614-// getAvailableDevices gets list of available physical HSM device instances from HSMPools in the operator namespace
615615-func (mm *MirrorManager) getAvailableDevices(ctx context.Context, operatorNamespace string) ([]string, error) {
614614+// getAvailableDevices gets list of available physical HSM device instances from HSMPools cluster-wide
615615+func (mm *MirrorManager) getAvailableDevices(ctx context.Context) ([]string, error) {
616616 var hsmPoolList hsmv1alpha1.HSMPoolList
617617- // HSMPools are always in the operator namespace (where controller-manager runs)
618618- if err := mm.client.List(ctx, &hsmPoolList, client.InNamespace(operatorNamespace)); err != nil {
619619- return nil, fmt.Errorf("failed to list HSM pools in operator namespace %s: %w", operatorNamespace, err)
617617+ // List HSMPools cluster-wide since they exist in the same namespace as their HSMDevices
618618+ if err := mm.client.List(ctx, &hsmPoolList); err != nil {
619619+ return nil, fmt.Errorf("failed to list HSM pools cluster-wide: %w", err)
620620 }
621621622622 var devices = []string{}
···645645 logger.Info("Starting device-scoped mirroring of all HSM secrets")
646646647647 // Get all available HSM devices
648648- devices, err := mm.getAvailableDevices(ctx, mm.operatorNamespace)
648648+ devices, err := mm.getAvailableDevices(ctx)
649649 if err != nil {
650650 return nil, fmt.Errorf("failed to get available devices: %w", err)
651651 }
···758758 return false, ctx.Err()
759759760760 case <-ticker.C:
761761- devices, err := mm.getAvailableDevices(ctx, mm.operatorNamespace)
761761+ devices, err := mm.getAvailableDevices(ctx)
762762 if err != nil {
763763 logger.V(1).Info("Failed to check available devices", "error", err)
764764 continue