Skip to content

No validation prevents creating image without source URL #261

@mandre

Description

@mandre

Using this minimal image spec:

apiVersion: openstack.k-orc.cloud/v1alpha1
kind: Image
metadata:
  name: create-minimal
spec:
  cloudCredentialsRef:
    cloudName: openstack-admin
    secretName: openstack-clouds
  managementPolicy: managed
  resource:
    content:
      diskFormat: qcow2

returns

apiVersion: openstack.k-orc.cloud/v1alpha1
kind: Image
[snip]
status:
  conditions:
  - lastTransitionTime: "2025-02-20T09:15:54Z"
    message: image source type URL has no url entry
    observedGeneration: 1
    reason: InvalidConfiguration
    status: "False"
    type: Available
  - lastTransitionTime: "2025-02-20T09:15:54Z"
    message: image source type URL has no url entry
    observedGeneration: 1
    reason: InvalidConfiguration
    status: "False"
    type: Progressing

spec.resource.content.download is required for managed resources. We must validate against it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions