Skip to content

Conversation

@andyatmiami
Copy link
Contributor

@andyatmiami andyatmiami commented Oct 27, 2025

related: #655

This commit introduces a stub of the secrets management API to the Kubeflow Notebooks
workspace backend.

API Endpoints Added:

  • GET /api/v1/secrets/{namespace} - List all secrets in namespace
  • POST /api/v1/secrets/{namespace} - Create new secret
  • GET /api/v1/secrets/{namespace}/{name} - Get specific secret details
  • PUT /api/v1/secrets/{namespace}/{name} - Update existing secret
  • DELETE /api/v1/secrets/{namespace}/{name} - Delete secret

Key Features:

  • Complete data models for secret operations (create, update, list, get, delete)
  • Comprehensive validation for secret keys and base64-encoded values
  • Full Swagger/OpenAPI documentation generation
  • Integration with existing authentication and authorization middleware
  • Support for secret mounting information and audit trails
  • Proper error handling and HTTP status codes

Known Omissions:

  • No repository/ support for the stubbed API implementations
  • API serves mocked data for all requests and does not actually interact k8s cluster
  • Unit tests are very crude and presently rely on mocked data
  • Missing business logic for majority of API handlers

This implementation provides the foundation for frontend integration to manage Kubernetes
secrets through the workspace interface.

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from andyatmiami. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot added area/v2 area - version - kubeflow notebooks v2 size/XXL labels Oct 27, 2025
@andyatmiami andyatmiami force-pushed the feat/secrets-api-stub branch 4 times, most recently from 5e56656 to be67e88 Compare October 27, 2025 15:58
@andyatmiami andyatmiami marked this pull request as ready for review October 27, 2025 15:59
@andyatmiami
Copy link
Contributor Author

/ok-to-test

@andyatmiami andyatmiami moved this from Needs Triage to In Progress in Kubeflow Notebooks Oct 27, 2025

// SecretValue represents a secret value with base64 encoding
type SecretValue struct {
Base64 string `json:"base64,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A secret value can be empty, so it needs to be a pointer to a string.

This commit introduces a stub of the secrets management API to the Kubeflow Notebooks
workspace backend. It is intended to bootstrap API development but will require
follow up work to actually implement the business logic in line with the API proposal.

**API Endpoints Added:**
- GET /api/v1/secrets/{namespace} - List all secrets in namespace
- POST /api/v1/secrets/{namespace} - Create new secret
- GET /api/v1/secrets/{namespace}/{name} - Get specific secret details
- PUT /api/v1/secrets/{namespace}/{name} - Update existing secret
- DELETE /api/v1/secrets/{namespace}/{name} - Delete secret

**Key Features:**
- Complete data models for secret operations (create, update, list, detail)
- Comprehensive validation for secret keys and base64-encoded values
- Full Swagger/OpenAPI documentation generation
- Integration with existing authentication and authorization middleware
- Support for secret mounting information and audit trails
- Proper error handling and HTTP status codes

**Known Omissions:**
- No repository/ support for the stubbed API implementations
- API serves mocked data for all requests and does not actually interact k8s cluster
- Unit tests are very crude and presently rely on mocked data
- Missing business logic for majority of API handlers

This implementation provides the foundation for frontend integration to manage Kubernetes
secrets through the workspace interface.

Signed-off-by: Andy Stoneberg <astonebe@redhat.com>
@andyatmiami andyatmiami force-pushed the feat/secrets-api-stub branch from be67e88 to 895e384 Compare November 7, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/backend area - related to backend components area/v2 area - version - kubeflow notebooks v2 ok-to-test size/XXL

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants