SovereignCloudStack / cluster-stacks

Definition of Cluster Stacks based on the ClusterAPI ClusterClass feature
https://scs.community/
Apache License 2.0
7 stars 6 forks source link

CAPI image name doesn't conform to scs-0102-v1 / incompatible with openstack-image-manager #156

Open martinmo opened 1 month ago

martinmo commented 1 month ago

/kind bug

What steps did you take and what happened: Workload clusters created with cluster stacks will use node image names such as

ubuntu-capi-image-v1.28.11

instead of

ubuntu-capi-image v1.28.11

The latter is what the scs-0102-v1 and scs-0104-v1 require (note the space instead of the dash).

This means that a compliant public image such as ubuntu-capi-image v1.28.11 uploaded by an operator will not be used for the K8s nodes. Instead, an image will be uploaded on-the-fly (if it wasn't uploaded during a previous run) and marked as private. This image is missing a lot of the properties that are usually set, such as image_source (already reported in #23). Also, since qcow2 seems to be used, in the case of Ceph this will circumvent the ability to use copy-on-write RBD clones and use a lot of space.

What did you expect to happen: For Kubernetes vX.Y.Z, cluster stacks should use ubuntu-capi-image vX.Y.Z as the image name.

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

martinmo commented 1 month ago

Btw, KaaS v1 has the same behavior, but I am not sure if I should open an issue for it as well, because it's already deprecated.

martinmo commented 1 month ago

@jschoone I assigned you, so it appears in the Kanban board that we review tomorrow, I hope that's ok.

martinmo commented 1 month ago

TBH, I didn't expect the discussion in the Container call to be that passionate and thought this would be a quick and easy change. To support the point from the standard's point of view a bit:

The original intent for using the space character is coming from the Image Metadata Standard in https://docs.scs.community/standards/scs-0102-v1-image-metadata/#naming

We suggest plain OS images to be named "Distribution Version", e.g. "openSUSE Leap 15.3" or "Ubuntu 20.04" or "CentOS 8", "Windows Server 2012R2". We do not normally recommend to add more detailed patch levels into the name.

The Standard Images standard works with an image spec file (with the format of that YAML specified in this standard). The IaaS certificate scope version is tied to a specific version of the image spec file, as you can see in the last row of the table at https://docs.scs.community/standards/scs-compatible-iaas (for IaaS v4, it is scs-0104-v1-images.yaml).

mbuechse commented 3 weeks ago

I created https://github.com/osism/openstack-image-manager/issues/820 https://github.com/osism/openstack-image-manager/issues/821 to help overcoming this issue...