SovereignCloudStack / cluster-stacks

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

Add image metadata to the OpenStack node-images.yaml as is defined in the related SCS standard #23

Open matofeder opened 9 months ago

matofeder commented 9 months ago

/kind feature

SCS standard scs-0102-v1-image-metadata describes what metadata (properties and tags) should be assigned to the image that is offered by the CSP.

These properties and tags are then evaluated by the Conformance Tests (script image-md-check.py).

CSPO supports a full list of create options, defined by the OpenStack API. Hence the node-images.yaml should include all mandatory properties and tags for each image.

Current state of node-images.yaml (openstack cluster stack)

apiVersion: openstack.infrastructure.clusterstack.x-k8s.io/v1alpha1
openStackNodeImages:
  - url: https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-k8s-capi-images/ubuntu-2204-kube-v1.28/ubuntu-2204-kube-v1.28.6.qcow2
    createOpts:
      name: ubuntu-capi-image-v1.28.6
      disk_format: qcow2
      container_format: bare
      visibility: shared

Desired state of node-images.yaml (openstack cluster stack)

apiVersion: openstack.infrastructure.clusterstack.x-k8s.io/v1alpha1
openStackNodeImages:
  - url: https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-k8s-capi-images/ubuntu-2204-kube-v1.28/ubuntu-2204-kube-v1.28.6.qcow2
    createOpts:
      name: ubuntu-capi-image-v1.28.6
      disk_format: qcow2
      container_format: bare
      visibility: shared
      properties:
      - architecture: x86_64 
      - ....
      tags:
      - managed_by_scs

Note: see KaaS V1 implementation

paulphys commented 9 months ago

We should also change visibility: shared to visibility: private. There is no need to have this exposed to every tenant.

chess-knight commented 7 months ago

Hi, @paulphys. Are you working on this, or we can take over?

paulphys commented 7 months ago

No I'm not, the issue is all yours if you wish

michal-gubricky commented 6 months ago

The Properties reference is hidden for the Images JSON serialization, see here. Therefore, CSPO is unable to create images in OpenStack with properties defined in this field. Upstream issues#3033.