···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.6.34
66+VERSION ?= 0.6.35
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.6.34
66-appVersion: v0.6.34
55+version: 0.6.35
66+appVersion: v0.6.35
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:
+25-10
internal/agent/pcscd_manager.go
···6666 p.logger.V(1).Info("Runtime directory ready", "dir", dir)
6767 }
68686969+ // Clean up stale socket file from previous runs
7070+ // pcscd will fail to start if the socket already exists
7171+ socketPath := "/run/pcscd/pcscd.comm"
7272+ if err := os.Remove(socketPath); err != nil && !os.IsNotExist(err) {
7373+ p.logger.Error(err, "Failed to remove stale socket", "path", socketPath)
7474+ return fmt.Errorf("failed to remove stale socket %s: %w", socketPath, err)
7575+ }
7676+ p.logger.V(1).Info("Cleaned up stale socket", "path", socketPath)
7777+6978 // Start pcscd with:
7079 // -f: foreground mode (don't daemonize)
7180 // -d: debug output (helps troubleshooting)
···147156}
148157149158// waitForReady polls for pcscd readiness by checking if the socket exists.
150150-// PC/SC Lite creates a socket at /var/run/pcscd/pcscd.comm when ready.
159159+// PC/SC Lite creates a socket at /run/pcscd/pcscd.comm when ready.
151160// Waits up to 5 seconds with 100ms polling interval.
152161func (p *PCSCDManager) waitForReady() error {
153162 const (
154163 maxAttempts = 50 // 50 attempts
155164 pollInterval = 100 * time.Millisecond // 100ms interval
156156- socketPath = "/var/run/pcscd/pcscd.comm"
157165 )
158166159159- p.logger.V(1).Info("Waiting for pcscd to be ready", "socket", socketPath)
167167+ // Check both possible socket locations (pcscd may use either)
168168+ // /run/pcscd is where our volume is mounted
169169+ // /var/run/pcscd is the legacy path (symlink on normal systems, but not in FROM scratch)
170170+ socketPaths := []string{"/run/pcscd/pcscd.comm", "/var/run/pcscd/pcscd.comm"}
160171161161- for i := 0; i < maxAttempts; i++ {
162162- // Check if the socket exists
163163- if _, err := os.Stat(socketPath); err == nil {
164164- p.logger.V(1).Info("pcscd socket detected", "attempts", i+1)
165165- // Give it a tiny bit more time to fully initialize
166166- time.Sleep(100 * time.Millisecond)
167167- return nil
172172+ p.logger.V(1).Info("Waiting for pcscd to be ready", "paths", socketPaths)
173173+174174+ for i := range maxAttempts {
175175+ // Check if the socket exists at either location
176176+ for _, socketPath := range socketPaths {
177177+ if _, err := os.Stat(socketPath); err == nil {
178178+ p.logger.Info("pcscd socket detected", "path", socketPath, "attempts", i+1)
179179+ // Give it a tiny bit more time to fully initialize
180180+ time.Sleep(100 * time.Millisecond)
181181+ return nil
182182+ }
168183 }
169184170185 // Check if process is still running