Problem description
The default domain Default has an ID default, but the ID field in DomainImport only allows format uuid
|
type DomainImport struct { |
|
// id contains the unique identifier of an existing OpenStack resource. Note |
|
// that when specifying an import by ID, the resource MUST already exist. |
|
// The ORC object will enter an error state if the resource does not exist. |
|
// +kubebuilder:validation:Format:=uuid |
|
// +kubebuilder:validation:MaxLength:=36 |
|
// +optional |
|
ID *string `json:"id,omitempty"` //nolint:kubeapilinter |
|
|
|
// filter contains a resource query which is expected to return a single |
|
// result. The controller will continue to retry if filter returns no |
|
// results. If filter returns multiple results the controller will set an |
|
// error state and will not continue to retry. |
|
// +optional |
|
Filter *DomainFilter `json:"filter,omitempty"` |
|
} |
$openstack domain list
+---------+---------+---------+--------------------+
| ID | Name | Enabled | Description |
+---------+---------+---------+--------------------+
| default | Default | True | The default domain |
+---------+---------+---------+--------------------+
Creating an imported Domain with import.id = default will cause a validation error.
---
apiVersion: openstack.k-orc.cloud/v1alpha1
kind: Domain
metadata:
name: default
spec:
cloudCredentialsRef:
cloudName: openstack-admin
secretName: openstack-clouds
managementPolicy: unmanaged
import:
id: default
The Domain "default" is invalid:
* spec.import.id: Invalid value: "default": spec.import.id in body must be of type uuid: "default"
* <nil>: Invalid value: null: some validation rules were not checked because the object was invalid; correct the existing errors to complete validation
ORC version
main
Additional information
No response
Relevant log output
Problem description
The default domain
Defaulthas an IDdefault, but theIDfield inDomainImportonly allows formatuuidopenstack-resource-controller/api/v1alpha1/zz_generated.domain-resource.go
Lines 28 to 43 in 8ea2155
Creating an imported
Domainwithimport.id=defaultwill cause a validation error.ORC version
main
Additional information
No response
Relevant log output