You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
The CSPO registers missing node images which is nice.
However, these node images do not carry the metadata that we want all (public) images to have on SCS environments.
(We can ignore the naming RECOMMENDATION, but not the required properties, IMVHO.)
See SCS-v0102 for the wanted metadata.
We should have something like:
architecture='x86_64'
hw_disk_bus='scsi', hw_rng_model='virtio', hw_scsi_model='virtio-scsi'
hypervisor_type='qemu'
image_build_date='20XX-YY-ZZ'
image_description='Ubuntu 22.04 node image for capo'
image_original_user='ubuntu'
image_source='https://minio.services.osism.tech/openstack-k8s-capi-images/ .....' (please insert correct location!)
provided_until='20AA-BB-CC' (should be build date plus 14m)
replace_frequency='never'
uuid_validity='20AA-BB-CC'
The hw_disk_bus settings are merely a recommendation, but they will help @Nils98Ar ...
Gophercloud drops Properties field when marshaling/unmarshaling JSON, see here and notice the json:"-".
CSPO uses an image import call to import the image.
In the case of the import image method, Glance's first step is to create an image record using the image create API call.
And finally, the create image call doc mention the following:
Additionally, you may include additional properties specified as key:value pairs, where the value must be a string data type. Keys are limited to 255 chars in length. Available key names may be limited by the cloud’s property protection configuration and reserved namespaces like os_glance.
IMO It means that the flat structure proposed by @Nils98Ar should work.
Gophercloud drops Properties field when marshaling/unmarshaling JSON, see here and notice the json:"-".
CSPO uses an image import call to import the image. In the case of the import image method, Glance's first step is to create an image record using the image create API call. And finally, the create image call doc mention the following:
Additionally, you may include additional properties specified as key:value pairs, where the value must be a string data type. Keys are limited to 255 chars in length. Available key names may be limited by the cloud’s property protection configuration and reserved namespaces like os_glance.
IMO It means that the flat structure proposed by @Nils98Ar should work.
After tests and searching around, I can confirm that Properties is not passed to the image import process and all properties (defined flat or not) are dropped. The initial JSON unmarshalling in CSPO caused this.
Activity
jschoone commentedon Jan 13, 2025
Right, the properties are missing in the CRD. Should be added as a map to make it possible to add them to the node image config like this:
Nils98Ar commentedon Jan 14, 2025
I am not sure but I think we propably need to add the properties flat without a properties node in the yaml: https://github.com/gophercloud/gophercloud/blob/5770765aa037e1572cbaa9474113010a1397e822/openstack/image/v2/images/testing/fixtures_test.go#L25-L50
matofeder commentedon Jan 15, 2025
+1 for the above
Gophercloud drops
Propertiesfield when marshaling/unmarshaling JSON, see here and notice thejson:"-".CSPO uses an image import call to import the image.
In the case of the
import imagemethod, Glance's first step is to create an image record using the image create API call.And finally, the create image call doc mention the following:
Additionally, you may include additional properties specified as key:value pairs, where the value must be a string data type. Keys are limited to 255 chars in length. Available key names may be limited by the cloud’s property protection configuration and reserved namespaces like os_glance.IMO It means that the flat structure proposed by @Nils98Ar should work.
matofeder commentedon Jan 16, 2025
After tests and searching around, I can confirm that
Propertiesis not passed to the image import process and all properties (defined flat or not) are dropped. The initial JSON unmarshalling in CSPO caused this.see also a related issue here: SovereignCloudStack/cluster-stacks#23, and comment SovereignCloudStack/cluster-stacks#23 (comment)
Nils98Ar commentedon Jan 16, 2025
So
json:"-"means "hide" and not "flat"?matofeder commentedon Jan 16, 2025
The field is ignored when marshaling/unmarshaling. https://go.dev/play/p/YrzOmK1uUGg