Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Extend reconcileMode option for other resources #45

Merged
merged 1 commit into from
Dec 16, 2024
Merged
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
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,7 @@ $(CONTROLLER_GEN): $(LOCALBIN)
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

.PHONY: custom-dashboard
custom-dashboard: ## Run the custom dashboard generator. For more information check out https://kubebuilder.io/plugins/available/grafana-v1-alpha
kubebuilder edit --plugins grafana.kubebuilder.io/v1-alpha
11 changes: 11 additions & 0 deletions docs/crds/reconciliation-modes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Reconciliation Mode

Kubemox is also supports different type of reconciliation modes to manage your `Kubemox` resources. You can define the annotation `proxmox.alperen.cloud/reconciliation-mode` in the `kubemox` objects to set the reconciliation mode. The default value is `Reconcile` which means the operator will reconcile the VirtualMachine object and handle the operations on Proxmox VE. You can find the all reconciliation modes in the table below.

| Reconciliation Mode | Description |
|---------------------|-------------|
| Reconcile | The operator will reconcile the VirtualMachine object and handle the operations on Proxmox VE. |
| WatchOnly | The operator will only watch the VirtualMachine object and do not handle the operations on Proxmox VE. |
| EnsureExists | The operator will ensure the VirtualMachine exists on Proxmox VE. If the VirtualMachine does not exist, the operator will create it and do nothing further. |
| Disable | The operator will not reconcile the VirtualMachine object and do not handle the operations on Proxmox VE. This is useful if you would like to debug something or you would like to disable the operator for the specific VirtualMachine object for a while. |
| DryRun (Experimental) | The operator will not handle the operations on Proxmox VE. This is useful if you would like to test the VirtualMachine object without affecting the Proxmox VE. |
14 changes: 7 additions & 7 deletions examples/virtualmachineclone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ spec:
network:
- model: virtio
bridge: vmbr0
pciDevices:
- device: "c0-p0-o0-if0"
type: "mapped"
- device: "0000:03:00.2"
type: "raw"
primaryGPU: true
pcie: true
# pciDevices:
# - deviceID: "c0-p0-o0-if0"
# type: "mapped"
# - deviceID: "0000:03:00.2"
# type: "raw"
# primaryGPU: true
# pcie: true
# Optional field to add additional features to the VM that doesn't included in the spec
additionalConfig:
balloon: "0"
Expand Down
4 changes: 2 additions & 2 deletions examples/virtualmachineset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ spec:
memory: 4096 # As MB
# Disk used by the VM
disk:
- storage: nvme
- storage: local-lvm
size: 50 # As GB
device: scsi
device: scsi0
# Network interfaces used by the VM
network:
- model: virtio
Expand Down
Loading
Loading