Skip to content

feat: unified vm-provision with vSphere/Proxmox + Ansible#54

Merged
patrick-hermann-sva merged 2 commits intomainfrom
feat/vm-provision
Apr 9, 2026
Merged

feat: unified vm-provision with vSphere/Proxmox + Ansible#54
patrick-hermann-sva merged 2 commits intomainfrom
feat/vm-provision

Conversation

@patrick-hermann-sva
Copy link
Copy Markdown
Contributor

Summary

  • New VMProvision XR combining VsphereVM, ProxmoxVM, and AnsibleRun
  • Select provider via spec.provider: vsphere|proxmox
  • Optional Ansible provisioning gated on spec.ansible.enabled + VM readiness
  • KCL composition with conditional resource emission and status aggregation
  • Auto-populates Ansible inventory with VM IP from OpenTofu output

Architecture

VMProvision (KCL composition)
  ├── VsphereVM XR  (if provider=vsphere)
  │   └── Workspace (opentofu.m)
  ├── ProxmoxVM XR  (if provider=proxmox)
  │   └── Workspace (opentofu.m)
  └── AnsibleRun XR (if ansible.enabled=true AND VM ready)
      └── Object → PipelineRun (tekton)

Dependencies

Requires these XRDs + Compositions on the cluster:

Test plan

  • Apply XRD + composition to cluster
  • Test vSphere VM creation without Ansible
  • Test Proxmox VM creation without Ansible
  • Test vSphere VM + Ansible provisioning (end-to-end)
  • Verify status aggregation (vmReady, ansibleReady, share.ip)
  • Delete XR and verify cascading deletion

🤖 Generated with Claude Code

patrick-hermann-sva and others added 2 commits April 9, 2026 11:37
Combines VsphereVM, ProxmoxVM, and AnsibleRun into a single VMProvision
XR. Select infrastructure provider via spec.provider (vsphere/proxmox)
and optionally enable Ansible provisioning with spec.ansible.enabled.

Uses KCL for conditional resource emission:
- Emits VsphereVM or ProxmoxVM based on provider selection
- Gates AnsibleRun on VM readiness and IP availability
- Auto-populates Ansible inventory with VM IP
- Aggregates status from sub-XRs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Crossplane v2 sets composition-resource-name to the metadata.name,
not the annotation value. Fix ocds lookups to use {name}-{suffix} pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant