kubevirt-service-provider

module
v0.1.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2026 License: Apache-2.0

README

KubeVirt Service Provider

Development

Prerequisites

For code generation (when modifying OpenAPI specs):

npm install -g @redocly/cli
OpenAPI Specification

The API is defined using OpenAPI 3.0. The specification files are:

  • Source: api/v1alpha1/openapi.source.yaml - Edit this file for API changes
  • Generated: api/v1alpha1/openapi.yaml - Auto-generated, do not edit directly

The source file references external DCM schemas which are automatically bundled during code generation.

Code Generation

Generate API code and resolve external references:

make generate-api

This command will:

  1. Bundle external OpenAPI references into a single file
  2. Generate Go types, server, client, and embedded spec code
Building
make build
Example call
curl -XPOST --data '{"vcpu": {"count": 1}, "memory": {"size": "1GB"}, "storage": {"disks": [{"name": "x", "capacity": "1GB"}]}, "guest_os": {"type": ""}, "metadata": {"name": "x"}, "service_type": "vm"}' -H 'Content-type: application/json'  http://localhost:8081/api/v1alpha1/vms
Releasing

Images are pushed to quay.io/dcm-project/kubevirt-service-provider. See Releasing in shared-workflows for the full release process, tag behavior, and version conventions.

License

Apache License 2.0. See LICENSE for details.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 provides primitives to interact with the openapi HTTP API.
Package v1alpha1 provides primitives to interact with the openapi HTTP API.
cmd
internal
api/server
Package server provides primitives to interact with the openapi HTTP API.
Package server provides primitives to interact with the openapi HTTP API.
pkg
client
Package client provides primitives to interact with the openapi HTTP API.
Package client provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL