Documentation
¶
Index ¶
- Constants
- Variables
- func GetMatchingVirtualMachines(vmSnapshotPolicy *proxmoxv1alpha1.VirtualMachineSnapshotPolicy, ...) []proxmoxv1alpha1.VirtualMachine
- func VMSnapshotCR(vmName, snapshotName, namespace, connectionName string) *proxmoxv1alpha1.VirtualMachineSnapshot
- type ContainerReconciler
- func (r *ContainerReconciler) CloneContainer(pc *proxmox.ProxmoxClient, container *proxmoxv1alpha1.Container) error
- func (r *ContainerReconciler) IsResourceReady(ctx context.Context, obj proxmox.Resource) (bool, error)
- func (r *ContainerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ContainerReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *ContainerReconciler) StartOrUpdateContainer(ctx context.Context, pc *proxmox.ProxmoxClient, ...) error
- func (r *ContainerReconciler) UpdateContainer(ctx context.Context, pc *proxmox.ProxmoxClient, ...) error
- func (r *ContainerReconciler) UpdateContainerStatus(ctx context.Context, pc *proxmox.ProxmoxClient, ...) error
- type CustomCertificateReconciler
- type ManagedVirtualMachineReconciler
- func (r *ManagedVirtualMachineReconciler) IsResourceReady(ctx context.Context, obj proxmox.Resource) (bool, error)
- func (r *ManagedVirtualMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ManagedVirtualMachineReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *ManagedVirtualMachineReconciler) UpdateManagedVirtualMachineStatus(ctx context.Context, pc *proxmox.ProxmoxClient, ...) error
- type ProxmoxConnectionReconciler
- type StorageDownloadURLReconciler
- type VirtualMachineReconciler
- func (r *VirtualMachineReconciler) CreateVirtualMachine(ctx context.Context, pc *proxmox.ProxmoxClient, ...) (ctrl.Result, error)
- func (r *VirtualMachineReconciler) DeleteVirtualMachine(ctx context.Context, pc *proxmox.ProxmoxClient, ...) (ctrl.Result, error)
- func (r *VirtualMachineReconciler) IsResourceReady(ctx context.Context, obj proxmox.Resource) (bool, error)
- func (r *VirtualMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *VirtualMachineReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *VirtualMachineReconciler) StopWatcher(name string)
- func (r *VirtualMachineReconciler) UpdateVirtualMachine(ctx context.Context, pc *proxmox.ProxmoxClient, ...) (*ctrl.Result, error)
- func (r *VirtualMachineReconciler) UpdateVirtualMachineStatus(ctx context.Context, pc *proxmox.ProxmoxClient, ...) error
- type VirtualMachineSetReconciler
- func (r *VirtualMachineSetReconciler) CreateVirtualMachineCR(vmSet *proxmoxv1alpha1.VirtualMachineSet, index string) error
- func (r *VirtualMachineSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *VirtualMachineSetReconciler) SetupWithManager(mgr ctrl.Manager) error
- type VirtualMachineSnapshotPolicyReconciler
- func (r *VirtualMachineSnapshotPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *VirtualMachineSnapshotPolicyReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *VirtualMachineSnapshotPolicyReconciler) StartSnapshotCronJobs(ctx context.Context, ...) error
- type VirtualMachineSnapshotReconciler
- type VirtualMachineTemplateReconciler
- func (r *VirtualMachineTemplateReconciler) IsResourceReady(ctx context.Context, obj proxmox.Resource) (bool, error)
- func (r *VirtualMachineTemplateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *VirtualMachineTemplateReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
const ( CustomCertReconcilationPeriod = 10 CustomCertMaxConcurrentReconciles = 10 )
const ( ManagedVMreconcilationPeriod = 15 ManagedVMmaxConcurrentReconciles = 5 )
const ( // Controller settings SDUreconcilationPeriod = 10 SDUmaxConcurrentReconciles = 3 )
const ( // Controller settings VMreconcilationPeriod = 10 VMmaxConcurrentReconciles = 10 )
const ( VMSetreconcilationPeriod = 10 VMSetmaxConcurrentReconciles = 5 )
const ( // Controller settings VMSnapshotreconcilationPeriod = 10 VMSnapshotmaxConcurrentReconciles = 3 )
const ( // Controller settings VMSnapshotPolicyreconcilationPeriod = 10 VMSnapshotPolicymaxConcurrentReconciles = 3 )
const (
// Controller settings
VMTemplateMaxConcurrentReconciles = 3
)
Variables ¶
var (
Clientset, DynamicClient = kubernetes.GetKubeconfig()
)
var (
StatusCode int
)
Functions ¶
func GetMatchingVirtualMachines ¶
func GetMatchingVirtualMachines(vmSnapshotPolicy *proxmoxv1alpha1.VirtualMachineSnapshotPolicy, r *VirtualMachineSnapshotPolicyReconciler, ctx context.Context) []proxmoxv1alpha1.VirtualMachine
func VMSnapshotCR ¶
func VMSnapshotCR(vmName, snapshotName, namespace, connectionName string) *proxmoxv1alpha1.VirtualMachineSnapshot
Types ¶
type ContainerReconciler ¶
type ContainerReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder Watchers *proxmox.ExternalWatchers }
ContainerReconciler reconciles a Container object
func (*ContainerReconciler) CloneContainer ¶
func (r *ContainerReconciler) CloneContainer(pc *proxmox.ProxmoxClient, container *proxmoxv1alpha1.Container) error
func (*ContainerReconciler) IsResourceReady ¶ added in v0.2.1
func (*ContainerReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Container object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile
func (*ContainerReconciler) SetupWithManager ¶
func (r *ContainerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*ContainerReconciler) StartOrUpdateContainer ¶
func (r *ContainerReconciler) StartOrUpdateContainer(ctx context.Context, pc *proxmox.ProxmoxClient, container *proxmoxv1alpha1.Container) error
func (*ContainerReconciler) UpdateContainer ¶
func (r *ContainerReconciler) UpdateContainer(ctx context.Context, pc *proxmox.ProxmoxClient, container *proxmoxv1alpha1.Container) error
func (*ContainerReconciler) UpdateContainerStatus ¶
func (r *ContainerReconciler) UpdateContainerStatus(ctx context.Context, pc *proxmox.ProxmoxClient, container *proxmoxv1alpha1.Container) error
type CustomCertificateReconciler ¶
type CustomCertificateReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
CustomCertificateReconciler reconciles a CustomCertificate object
func (*CustomCertificateReconciler) Reconcile ¶
func (r *CustomCertificateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
CustomCertifaceController implements two main features: 1. It creates a certificate using cert-manager and stores it in a secret 2. It updates the Proxmox node with the new certificate
func (*CustomCertificateReconciler) SetupWithManager ¶
func (r *CustomCertificateReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ManagedVirtualMachineReconciler ¶
type ManagedVirtualMachineReconciler struct { client.Client Scheme *runtime.Scheme Watchers *proxmox.ExternalWatchers Recorder record.EventRecorder }
ManagedVirtualMachineReconciler reconciles a ManagedVirtualMachine object
func (*ManagedVirtualMachineReconciler) IsResourceReady ¶ added in v0.2.1
func (*ManagedVirtualMachineReconciler) Reconcile ¶
func (r *ManagedVirtualMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ManagedVirtualMachine object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile
func (*ManagedVirtualMachineReconciler) SetupWithManager ¶
func (r *ManagedVirtualMachineReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*ManagedVirtualMachineReconciler) UpdateManagedVirtualMachineStatus ¶ added in v0.1.1
func (r *ManagedVirtualMachineReconciler) UpdateManagedVirtualMachineStatus(ctx context.Context, pc *proxmox.ProxmoxClient, managedVM *proxmoxv1alpha1.ManagedVirtualMachine) error
type ProxmoxConnectionReconciler ¶ added in v0.4.0
ProxmoxConnectionReconciler reconciles a ProxmoxConnection object
func (*ProxmoxConnectionReconciler) Reconcile ¶ added in v0.4.0
func (r *ProxmoxConnectionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ProxmoxConnection object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.1/pkg/reconcile
func (*ProxmoxConnectionReconciler) SetupWithManager ¶ added in v0.4.0
func (r *ProxmoxConnectionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type StorageDownloadURLReconciler ¶
StorageDownloadURLReconciler reconciles a StorageDownloadURL object
func (*StorageDownloadURLReconciler) Reconcile ¶
func (r *StorageDownloadURLReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the StorageDownloadURL object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.16.3/pkg/reconcile
func (*StorageDownloadURLReconciler) SetupWithManager ¶
func (r *StorageDownloadURLReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type VirtualMachineReconciler ¶
type VirtualMachineReconciler struct { client.Client Scheme *runtime.Scheme Watchers *proxmox.ExternalWatchers Recorder record.EventRecorder }
VirtualMachineReconciler reconciles a VirtualMachine object
func (*VirtualMachineReconciler) CreateVirtualMachine ¶
func (r *VirtualMachineReconciler) CreateVirtualMachine(ctx context.Context, pc *proxmox.ProxmoxClient, vm *proxmoxv1alpha1.VirtualMachine) (ctrl.Result, error)
TODO: Reduce cyclomatic complexity or refactor the function CreateVirtualMachine creates a VirtualMachine on the Proxmox and returns the ctrl.result and error The reason for ctrl.Result is to requeue the VirtualMachine based on the error
func (*VirtualMachineReconciler) DeleteVirtualMachine ¶
func (r *VirtualMachineReconciler) DeleteVirtualMachine(ctx context.Context, pc *proxmox.ProxmoxClient, vm *proxmoxv1alpha1.VirtualMachine) (ctrl.Result, error)
func (*VirtualMachineReconciler) IsResourceReady ¶ added in v0.2.1
func (*VirtualMachineReconciler) Reconcile ¶
func (r *VirtualMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*VirtualMachineReconciler) SetupWithManager ¶
func (r *VirtualMachineReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*VirtualMachineReconciler) StopWatcher ¶ added in v0.3.1
func (r *VirtualMachineReconciler) StopWatcher(name string)
func (*VirtualMachineReconciler) UpdateVirtualMachine ¶
func (r *VirtualMachineReconciler) UpdateVirtualMachine(ctx context.Context, pc *proxmox.ProxmoxClient, vm *proxmoxv1alpha1.VirtualMachine) (*ctrl.Result, error)
func (*VirtualMachineReconciler) UpdateVirtualMachineStatus ¶
func (r *VirtualMachineReconciler) UpdateVirtualMachineStatus(ctx context.Context, pc *proxmox.ProxmoxClient, vm *proxmoxv1alpha1.VirtualMachine) error
type VirtualMachineSetReconciler ¶
VirtualMachineSetReconciler reconciles a VirtualMachineSet object
func (*VirtualMachineSetReconciler) CreateVirtualMachineCR ¶
func (r *VirtualMachineSetReconciler) CreateVirtualMachineCR(vmSet *proxmoxv1alpha1.VirtualMachineSet, index string) error
func (*VirtualMachineSetReconciler) Reconcile ¶
func (r *VirtualMachineSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the VirtualMachineSet object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile
func (*VirtualMachineSetReconciler) SetupWithManager ¶
func (r *VirtualMachineSetReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type VirtualMachineSnapshotPolicyReconciler ¶
VirtualMachineSnapshotPolicyReconciler reconciles a VirtualMachineSnapshotPolicy object
func (*VirtualMachineSnapshotPolicyReconciler) Reconcile ¶
func (r *VirtualMachineSnapshotPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the VirtualMachineSnapshotPolicy object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile
func (*VirtualMachineSnapshotPolicyReconciler) SetupWithManager ¶
func (r *VirtualMachineSnapshotPolicyReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*VirtualMachineSnapshotPolicyReconciler) StartSnapshotCronJobs ¶
func (r *VirtualMachineSnapshotPolicyReconciler) StartSnapshotCronJobs(ctx context.Context, vmSnapshotPolicy *proxmoxv1alpha1.VirtualMachineSnapshotPolicy) error
type VirtualMachineSnapshotReconciler ¶
VirtualMachineSnapshotReconciler reconciles a VirtualMachineSnapshot object
func (*VirtualMachineSnapshotReconciler) Reconcile ¶
func (r *VirtualMachineSnapshotReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the VirtualMachineSnapshot object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile
func (*VirtualMachineSnapshotReconciler) SetupWithManager ¶
func (r *VirtualMachineSnapshotReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type VirtualMachineTemplateReconciler ¶ added in v0.1.2
type VirtualMachineTemplateReconciler struct { client.Client Scheme *runtime.Scheme Watchers *proxmox.ExternalWatchers Recorder record.EventRecorder }
VirtualMachineTemplateReconciler reconciles a VirtualMachineTemplate object
func (*VirtualMachineTemplateReconciler) IsResourceReady ¶ added in v0.2.1
func (*VirtualMachineTemplateReconciler) Reconcile ¶ added in v0.1.2
func (r *VirtualMachineTemplateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the VirtualMachineTemplate object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.3/pkg/reconcile
func (*VirtualMachineTemplateReconciler) SetupWithManager ¶ added in v0.1.2
func (r *VirtualMachineTemplateReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Source Files
¶
- container_controller.go
- customcertificate_controller.go
- managedvirtualmachine_controller.go
- proxmoxconnection_controller.go
- storagedownloadurl_controller.go
- virtualmachine_controller.go
- virtualmachineset_controller.go
- virtualmachinesnapshot_controller.go
- virtualmachinesnapshotpolicy_controller.go
- virtualmachinetemplate_controller.go