Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ make image-build # Build container image using podman/docker
| POST | /api/v1alpha1/providers | External SP registration |
| GET | /api/v1alpha1/providers/{provider_id} | Get a single SP by ID |

Embedded SPs do **not** expose their service-type REST APIs (for example
`/api/v1alpha1/volumes`) on the agent. The agent forwards **create** and
**delete** in-process (or to external SP HTTP endpoints). **List and get**
of provisioned instances go through the control-plane SP Resource Manager:

- `GET /api/v1alpha1/service-type-instances?service_type=<type>`
- `GET /api/v1alpha1/service-type-instances/{instance_id}`

Instance status is updated when embedded SPs publish CloudEvents to NATS and
the SPRM status consumer processes them.

## License

Apache 2.0 — see [LICENSE](LICENSE) for details.
67 changes: 16 additions & 51 deletions api/storage/v1alpha1/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
openapi: 3.0.4
info:
title: Kubernetes Storage Service Provider API
title: Storage Service Provider API
description: |
REST API for managing persistent storage volumes (PersistentVolumeClaims)
on Kubernetes clusters on behalf of DCM.
REST API for managing persistent storage volumes on behalf of DCM.
This API follows AEP standards for consistency across DCM services.
version: 1.0.0
contact:
Expand All @@ -14,7 +13,7 @@ info:

servers:
- url: /
description: K8s Storage Service Provider
description: Storage Service Provider

tags:
- name: Health
Expand Down Expand Up @@ -69,7 +68,7 @@ paths:

post:
summary: Create Volume
description: Create a new storage volume instance (PersistentVolumeClaim)
description: Create a new storage volume instance
operationId: createVolume
tags:
- Volumes
Expand Down Expand Up @@ -107,13 +106,13 @@ paths:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Volume with the same instance ID (PVC name) already exists
description: Volume with the same instance ID already exists
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Requested StorageClass does not exist
description: Requested storage class does not exist
content:
application/problem+json:
schema:
Expand Down Expand Up @@ -171,7 +170,7 @@ paths:

delete:
summary: Delete Volume
description: Delete a specific volume instance (PVC)
description: Delete a specific volume instance
operationId: deleteVolume
tags:
- Volumes
Expand Down Expand Up @@ -213,7 +212,7 @@ components:
singular: health
plural: healths
singleton: true
type: k8s-storage-service-provider.dcm.io/health
type: storage-service-provider.dcm.io/health
patterns:
- health
required:
Expand All @@ -228,7 +227,7 @@ components:
format: uri-reference
readOnly: true
description: Resource type identifier
example: "k8s-storage-service-provider.dcm.io/health"
example: "storage-service-provider.dcm.io/health"
status:
type: string
description: Health status
Expand Down Expand Up @@ -259,24 +258,6 @@ components:
- DELETED
description: Current status of the storage instance (CloudEvents payload uses this enum)

VolumeAccessMode:
type: string
enum:
- ReadWriteOnce
- ReadOnlyMany
- ReadWriteMany
description: |
PVC access mode. Controls attachment scope and permissions at creation
time (Kubernetes-specific; see service type definitions).
example: ReadWriteOnce

VolumeMode:
type: string
enum:
- Filesystem
- Block
description: PVC volume mode

VolumeMetadata:
type: object
description: Resource metadata for identification
Expand All @@ -285,7 +266,7 @@ components:
properties:
name:
type: string
description: DCM instance ID and Kubernetes PVC name (AEP-122)
description: DCM instance ID (AEP-122)
pattern: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'
minLength: 1
maxLength: 63
Expand All @@ -297,40 +278,24 @@ components:
namespace:
type: string
readOnly: true
description: Kubernetes namespace where the PVC was created
description: Platform namespace where the volume was created
storage_class:
type: string
readOnly: true
description: StorageClass name bound to the PVC
description: Storage class name bound to the volume
volume_name:
type: string
readOnly: true
description: Bound PersistentVolume name when available

KubernetesProviderHints:
type: object
description: Kubernetes-specific PVC settings
additionalProperties: false
properties:
storage_class:
type: string
description: StorageClass name (overrides SP default)
volume_mode:
$ref: '#/components/schemas/VolumeMode'
access_mode:
$ref: '#/components/schemas/VolumeAccessMode'
description: Bound backend volume name when available

ProviderHints:
type: object
description: Provider-specific hints from the catalog
additionalProperties: true
properties:
kubernetes:
$ref: '#/components/schemas/KubernetesProviderHints'

StorageSpec:
type: object
description: Storage specification for creating a PVC (implements the portable storage service type)
description: Storage specification for creating a volume (implements the portable storage service type)
required:
- service_type
- metadata
Expand All @@ -352,9 +317,9 @@ components:

Volume:
type: object
description: Volume resource representing a PVC instance
description: Volume resource representing a storage instance
x-aep-resource:
type: k8s-storage-service-provider.dcm.io/volume
type: storage-service-provider.dcm.io/volume
singular: volume
plural: volumes
patterns:
Expand Down
84 changes: 40 additions & 44 deletions api/storage/v1alpha1/spec.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading