Conversation
274c166 to
8b7ed42
Compare
…ersion CRDs Port custom resource type definitions from hbc/agent-op-cr-poc: - MachineOperation: discrete operations (Reboot, HardReboot) on machines - MachineConfiguration: deployment-like config profiles with update strategies - MachineConfigurationVersion: immutable versioned snapshots of configurations - Machine CR additions: configurationRef, configuration status, NodeUpdated condition, and configuration version annotation
| // MachineRef is the name of the Machine CR this operation targets. | ||
| // Either machineRef or machineSelector must be set. | ||
| // +optional | ||
| MachineRef string `json:"machineRef,omitempty"` |
There was a problem hiding this comment.
Thinking about the VM operations here, so we have an assumption that Machine CR will contain necessary identifying information for the operations?
e.g. ARM ResourceID and Tenant for Azure, Proxmox VMID and pve endpoint, etc.
There was a problem hiding this comment.
yeah i think we will need a way to correlate the cloud provider identity in machine side. Or we can correlate with the cloud provider id from node then to machine
There was a problem hiding this comment.
We could probably label the machine with this info or put it into the CR. I'm not sure what is the most ergonomic, but we do need some way of mapping a given machine to it's underlying host.
I guess how does the inventory piece fit in here?
@jveski @cchildress might have some more info
| // MachineOperation is kept indefinitely. | ||
| // +optional | ||
| // +kubebuilder:validation:Minimum=0 | ||
| TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"` |
There was a problem hiding this comment.
I wonder if each operation should have TTL as well. It feels like we could get an operation stuck in a Pending state pretty easily
Adopt CRD type definitions from #96 (MachineOperation, MachineConfiguration, MachineConfigurationVersion). Update implementations: - Rename OperationName -> OperationKind, OperationReboot -> OperationSoftReboot - Convert RegisterWithTaints from []string to []corev1.Taint in MCV overlay - Add taint parse/format helpers for kubectl-unbounded - Remove old operation_types.go (superseded by machineoperation_types.go) - Add MachineConditionConfigurationPending constant
Summary
Adds three new custom resource definitions following the design in New CRDs, derived from the prototype in #59:
mop): discrete operations (SoftReboot, HardReboot) targeting machinesmc): deployment-like configuration profiles with update strategies and machine selectorsmcv): immutable versioned snapshots of configuration templatesconfigurationRef(spec),configurationstatus,NodeUpdatedandConfigurationPendingconditions, andAnnotationConfigurationVersionThis PR contains only the CR type definitions and generated artifacts. Controller, CLI, and agent implementations will follow in subsequent PRs.