Skip to content

feat: use go-spiffe SDK directly instead of spiffe-helper sidecar - #522

Open
Alan-Cha wants to merge 1 commit into
mainfrom
feat/spiffe-sdk-jwt-clean
Open

feat: use go-spiffe SDK directly instead of spiffe-helper sidecar#522
Alan-Cha wants to merge 1 commit into
mainfrom
feat/spiffe-sdk-jwt-clean

Conversation

@Alan-Cha

Copy link
Copy Markdown
Member

Summary

Remove spiffe-helper sidecar from operator pod and use go-spiffe SDK directly to fetch JWT-SVIDs from the SPIRE Workload API.

Changes

  • operator/cmd/main.go: Remove --jwt-svid-path flag, pass SpiffeSocket to controller
  • operator/internal/controller/clientregistration_controller.go:
    • Replace JWTSVIDPath field with SpiffeSocket
    • Add fetchJWTSVID() helper using workloadapi.Client.FetchJWTSVID()
  • charts/operator/templates/manager/manager.yaml: Remove spiffe-helper sidecar container, jwt-svid volume, and --jwt-svid-path CLI arg
  • charts/operator/templates/manager/configmap-spiffe-helper.yaml: Delete (no longer needed)

Motivation

This matches the architecture already used by authbridge-proxy and eliminates the need for maintaining a separate spiffe-helper sidecar. The go-spiffe SDK provides direct Workload API access, making the file-based JWT-SVID exchange unnecessary.

Testing

  • ✅ Operator builds successfully with go-spiffe SDK
  • ✅ Operator pod runs with single container (no spiffe-helper sidecar)
  • ✅ Client registration controller compiles with new fetchJWTSVID() method
  • ✅ E2E test verifies weather agents deploy and register correctly

Closes

Replaces #478 with a clean implementation.

Assisted-By: Claude Code

Remove spiffe-helper sidecar from operator pod and use go-spiffe SDK
directly to fetch JWT-SVIDs from the SPIRE Workload API.

Changes:
- operator/cmd/main.go: Remove --jwt-svid-path flag, pass SpiffeSocket
  instead of JWTSVIDPath to controller
- operator/internal/controller/clientregistration_controller.go:
  Replace JWTSVIDPath field with SpiffeSocket, add fetchJWTSVID()
  helper that uses workloadapi.Client.FetchJWTSVID() to get JWT-SVID
- charts/operator/templates/manager/manager.yaml: Remove spiffe-helper
  sidecar container, jwt-svid volume, and --jwt-svid-path CLI arg
- charts/operator/templates/manager/configmap-spiffe-helper.yaml:
  Delete (no longer needed)

This matches the architecture already used by authbridge-proxy and
eliminates the need for maintaining a separate spiffe-helper sidecar.

Closes: #478
Signed-off-by: Alan Cha <Alan.cha1@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant