Update .gitignore, remove package-lock.json, and enhance Cloudflare and Proxmox adapters
- Added lock file exclusions for pnpm in .gitignore. - Removed obsolete package-lock.json from the api and portal directories. - Enhanced Cloudflare adapter with additional interfaces for zones and tunnels. - Improved Proxmox adapter error handling and logging for API requests. - Updated Proxmox VM parameters with validation rules in the API schema. - Enhanced documentation for Proxmox VM specifications and examples.
This commit is contained in:
@@ -11,7 +11,10 @@ type ProxmoxVMParameters struct {
|
||||
Node string `json:"node"`
|
||||
|
||||
// Name is the name of the virtual machine
|
||||
// Must be 1-100 characters, alphanumeric, hyphen, underscore, dot, or space (not at edges)
|
||||
// +kubebuilder:validation:Required
|
||||
// +kubebuilder:validation:MinLength=1
|
||||
// +kubebuilder:validation:MaxLength=100
|
||||
Name string `json:"name"`
|
||||
|
||||
// CPU is the number of CPU cores
|
||||
@@ -19,11 +22,15 @@ type ProxmoxVMParameters struct {
|
||||
// +kubebuilder:default=2
|
||||
CPU int `json:"cpu,omitempty"`
|
||||
|
||||
// Memory is the amount of memory (e.g., "8Gi", "4096")
|
||||
// Memory is the amount of memory (e.g., "8Gi", "4096Mi")
|
||||
// Supports: Gi, Mi, Ki, G, M, K (case-insensitive) or plain numbers (assumed MB)
|
||||
// Range: 128 MB - 2 TB
|
||||
// +kubebuilder:validation:Required
|
||||
Memory string `json:"memory"`
|
||||
|
||||
// Disk is the disk size (e.g., "100Gi", "50")
|
||||
// Disk is the disk size (e.g., "100Gi", "50Gi")
|
||||
// Supports: Ti, Gi, Mi, T, G, M (case-insensitive) or plain numbers (assumed GB)
|
||||
// Range: 1 GB - 100 TB
|
||||
// +kubebuilder:validation:Required
|
||||
Disk string `json:"disk"`
|
||||
|
||||
@@ -31,11 +38,17 @@ type ProxmoxVMParameters struct {
|
||||
// +kubebuilder:default="local-lvm"
|
||||
Storage string `json:"storage,omitempty"`
|
||||
|
||||
// Network is the network bridge name
|
||||
// Network is the network bridge name (e.g., "vmbr0")
|
||||
// Must exist on the target node (validated before VM creation)
|
||||
// Format: alphanumeric, hyphen, underscore
|
||||
// +kubebuilder:default="vmbr0"
|
||||
Network string `json:"network,omitempty"`
|
||||
|
||||
// Image is the OS template/image name
|
||||
// Image is the OS template/image specification
|
||||
// Formats supported:
|
||||
// - Template VMID: "100" (numeric, 100-999999999)
|
||||
// - Volume ID: "storage:path/to/image"
|
||||
// - Image name: "ubuntu-22.04-cloud" (max 255 chars)
|
||||
// +kubebuilder:validation:Required
|
||||
Image string `json:"image"`
|
||||
|
||||
@@ -43,7 +56,8 @@ type ProxmoxVMParameters struct {
|
||||
// +kubebuilder:validation:Required
|
||||
Site string `json:"site"`
|
||||
|
||||
// CloudInitUserData is optional cloud-init user data
|
||||
// UserData is optional cloud-init user data in YAML format
|
||||
// This will be written to the VM's cloud-init drive for first-boot configuration
|
||||
UserData string `json:"userData,omitempty"`
|
||||
|
||||
// SSHKeys is a list of SSH public keys to inject
|
||||
|
||||
Reference in New Issue
Block a user