/kind feature
Current state
OpenStackNodeImageRelease controller filters images based on their names only.
Background :
OpenStackNodeImageRelease resource name is composed as follows: release tag without version-image name-node-image-version (e.g.: openstack-ferrol-1-27-ubuntu-capi-image-v1.27.8-v2). When the OpenStackNodeImageRelease resource is created, the controller will search for the node image in the OpenStack project based on its image name only. If the OpenStack project does not contain a node image with the given image name, then the image is imported.
If the ClusterStack version is changed (e.g., the addon version has been updated), it is expected that the node image could be reused. This ensures that multiple versions of one ClusterStack can share one node image.
An issue could occur when the node-image-version is changed as well, e.g., some image create-options are changed, but the image name remains the same. In this case, the controller finds the given image name in the OpenStack project and does not import the new version of the image. This causes an inconsistent state because the node image in the OpenStack project was not created with the desired create-options and we end with one imported image and two OpenStackNodeImageRelease resources (two node-image-versions).
Desired state
OpenStackNodeImageRelease controller filters images based on their names and tags.
We should allow the creation of multiple images with the same name in the OpenStack project and distinguish them by unique tags. Consequently, one ClusterStack, across multiple versions and importantly with multiple node-image-versions, could use the same image name. Therefore, the creator of the ClusterStack does not need to introduce a unique node-image name when the node-image-version is changed. However, the creator of the ClusterStack should ensure that the unique tag (node-image-version) is passed to the CAPO resources.
CAPO
The latest released version of Cluster API OpenStack Provider v1alpha7 does not support image tag filtering.
In Cluster API OpenStack Provider v1beta1 (not released yet) the node image could be filtered based on its ID or based on a combination of name, and tags (see here). The combination of name and tags must return a single matching image. Filtering by tags is new and allows to have images with the same name, that should be recognized by tags.
/kind feature
Current state
OpenStackNodeImageRelease controller filters images based on their names only.
Background :
OpenStackNodeImageRelease resource name is composed as follows:
release tag without version-image name-node-image-version(e.g.:openstack-ferrol-1-27-ubuntu-capi-image-v1.27.8-v2). When the OpenStackNodeImageRelease resource is created, the controller will search for the node image in the OpenStack project based on itsimage nameonly. If the OpenStack project does not contain a node image with the given image name, then the image is imported.If the ClusterStack version is changed (e.g., the addon version has been updated), it is expected that the node image could be reused. This ensures that multiple versions of one ClusterStack can share one node image.
An issue could occur when the
node-image-versionis changed as well, e.g., some image create-options are changed, but theimage nameremains the same. In this case, the controller finds the givenimage namein the OpenStack project and does not import the new version of the image. This causes an inconsistent state because the node image in the OpenStack project was not created with the desired create-options and we end with one imported image and two OpenStackNodeImageRelease resources (two node-image-versions).Desired state
OpenStackNodeImageRelease controller filters images based on their names and tags.
We should allow the creation of multiple images with the same name in the OpenStack project and distinguish them by unique tags. Consequently, one ClusterStack, across multiple versions and importantly with multiple node-image-versions, could use the same image name. Therefore, the creator of the ClusterStack does not need to introduce a unique node-image name when the node-image-version is changed. However, the creator of the ClusterStack should ensure that the unique tag (node-image-version) is passed to the CAPO resources.
CAPO
The latest released version of Cluster API OpenStack Provider
v1alpha7does not support image tag filtering.In Cluster API OpenStack Provider
v1beta1(not released yet) the node image could be filtered based on its ID or based on a combination of name, and tags (see here). The combination of name and tags must return a single matching image. Filtering by tags is new and allows to have images with the same name, that should be recognized by tags.