implement a consistent ID for IRI relevant resources to track in the object resource
Summary
Compared to the machine status (https://github.com/ironcore-dev/ironcore/blob/main/api/compute/v1alpha1/machine_types.go#L176) the volume and bucket status struct is missing such a field. We would like to consistently implement the possibility to let either a broker or a provider implementation set this field accordingly.
Basic example
We have a volume:
apiVersion: storage.ironcore.dev/v1alpha1
kind: Volume
metadata:
creationTimestamp: "2025-04-08T10:18:21Z"
finalizers:
- volumepoollet.ironcore.dev/volume
name: csi-ironcore-0a825e6a10
namespace: srs-irc90-0
resourceVersion: "601112031"
uid: 402f80b1-fecb-44f0-96db-9e39a0cfd33d
spec:
claimRef:
name: srs-irc90-0-worker-lab2-64984-4fdjj
uid: 4ec2c869-f13d-42e5-9db1-035873d4a6be
resources:
storage: 10Gi
volumeClassRef:
name: fast
volumePoolRef:
name: lab
status:
access:
driver: ceph
handle: 180455396670c76a
secretRef:
name: xyz
volumeAttributes:
image: ceph/img_xyz
monitors: '[::]:6789'
lastStateTransitionTime: "2025-04-08T10:18:32Z"
state: Available
and the derived / brokered object in the downward lower layer:
apiVersion: storage.ironcore.dev/v1alpha1
kind: Volume
metadata:
annotations:
volumebroker.ironcore.dev/annotations: "null"
volumebroker.ironcore.dev/labels: '{"volumepoollet.ironcore.dev/volume-name":"csi-ironcore-0a825e6a10","volumepoollet.ironcore.dev/volume-namespace":"srs-irc90-0","volumepoollet.ironcore.dev/volume-uid":"402f80b1-fecb-44f0-96db-9e39a0cfd33d"}'
creationTimestamp: "2025-04-08T10:18:21Z"
finalizers:
- volumepoollet.ironcore.dev/volume
labels:
volumebroker.ironcore.dev/created: "true"
volumebroker.ironcore.dev/manager: volumebroker
name: 7539809704801c858ef7d125ae6600571a04e17c45790423a07cf5c47cfbb33
namespace: ironcore-lab-volumepoollet-system
resourceVersion: "1115461660"
uid: bb82bbbc-9568-4ddd-87d8-a8b1efb7c701
spec:
resources:
storage: "10737418240"
volumeClassRef:
name: fast
volumePoolRef:
name: lab-shared1
status:
access:
driver: ceph
handle: 180455396670c76a
secretRef:
name: xyz
volumeAttributes:
image: ceph/img_xyz
monitors: '[::]:6789'
lastStateTransitionTime: "2025-04-08T10:18:25Z"
state: Available
The upper layer volume resource should have a field .status.volumeID providing the ID of the object from the lower layer, so:
status:
volumeID: volumebroker://7539809704801c858ef7d125ae6600571a04e17c45790423a07cf5c47cfbb33
And, assuming the next lower layer is the provider-specific layer:
status:
volumeID: ceph-provider://180455396670c76a
Motivation
This enables a consistent approach to identify the downward derived object in the lower layer, be it an intermediate layer or the provider-specific layer.
It is also a stepping stone to solve https://github.com/ironcore-dev/ceph-provider/issues/710.