Examples

This document provides practical examples for using VirtRigaud with the Remote provider architecture.

Quick Start Examples

All VirtRigaud providers now run as Remote providers. Here are the essential examples to get started:

Basic Provider Setup

Complete Working Examples

Individual Resource Examples

Advanced Examples

Example Directory Structure

docs/examples/
├── provider-*.yaml          # Provider configurations
├── complete-example.yaml    # Full working setup
├── *-advanced-example.yaml  # Production configurations
├── vm*.yaml                 # Individual resource definitions
├── advanced/                # Advanced operations
├── security/                # Security configurations
└── secrets/                 # Credential examples

Key Changes from Previous Versions

Remote-Only Architecture

All providers now run as separate pods with the Remote runtime:

apiVersion: infra.virtrigaud.io/v1beta1
kind: Provider
metadata:
  name: my-provider
spec:
  type: vsphere  # or libvirt, proxmox
  endpoint: https://vcenter.example.com
  credentialSecretRef:
    name: provider-creds
  runtime:
    mode: Remote              # Required - only mode supported
    image: "ghcr.io/projectbeskar/virtrigaud/provider-vsphere:v0.2.3"
    service:
      port: 9090

Current API Schema (v0.2.3)

  • VMClass: Standard Kubernetes resource quantities (cpus: 4, memory: "4Gi")
  • VMImage: Provider-specific source configurations
  • VMNetworkAttachment: Network provider abstractions
  • VirtualMachine: Declarative power state management

Configuration Management

Providers receive configuration through:

  • Endpoint: Environment variable PROVIDER_ENDPOINT
  • Credentials: Mounted secret files in /etc/virtrigaud/credentials/
  • Runtime: Managed automatically by the provider controller

Getting Started

  1. Choose your provider from the basic examples above
  2. Create credentials secret (see examples/secrets/)
  3. Apply provider configuration with required runtime section
  4. Define VM resources (VMClass, VMImage, VMNetworkAttachment)
  5. Create VirtualMachine referencing your resources

For detailed setup instructions, see:

Need Help?