ironcore-dev / ironcore

Cloud Native Infrastructure as a Service
https://ironcore-dev.github.io/ironcore
Apache License 2.0
30 stars 5 forks source link

The `Machine` status should track a reference for its claimed `Volume` resource #1118

Closed balpert89 closed 3 weeks ago

balpert89 commented 1 month ago

Summary

The Machine status only has information of the current handle of a Volume. The VolumeStatus struct should expose a field which unanimously identifies the claimed Volume on API level (a reference to a volume.storage.ironcore.dev resource). This should be a of type corev1.LocalObjectReference.

Basic example

apiVersion: compute.ironcore.dev/v1alpha1
kind: Machine
metadata:
  name: machine
  namespace: my-namespace
spec:
  ...
status:
  volumes:
  - handle: libvirt-provider.ironcore.dev/ceph/libvirt-provider.ironcore.dev/ceph^xyz
    lastStateTransitionTime: "2024-09-04T11:38:24Z"
    name: root-disk-1
    state: Attached
    volumeRef:
      name: machine-root-disk-1

Motivation

This is a quality of life addition to easily identify the resources claimed by a Machine resource.