diff --git a/api/v1alpha1/openstackclusterstackrelease_types.go b/api/v1alpha1/openstackclusterstackrelease_types.go index 9f514a3f..5d893700 100644 --- a/api/v1alpha1/openstackclusterstackrelease_types.go +++ b/api/v1alpha1/openstackclusterstackrelease_types.go @@ -28,8 +28,20 @@ type OpenStackClusterStackReleaseSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file - // Foo is an example field of OpenStackClusterStackRelease. Edit openstackclusterstackrelease_types.go to remove/update - Foo string `json:"foo,omitempty"` + IdentityRef OpenStackIdentityReference `json:"identityRef,omitempty"` + CloudName string `json:"cloudName"` +} + +type OpenStackIdentityReference struct { + // Kind of the identity. Must be supported by the infrastructure + // provider and may be either cluster or namespace-scoped. + // +kubebuilder:validation:MinLength=1 + Kind string `json:"kind"` + + // Name of the infrastructure identity to be used. + // Must be either a cluster-scoped resource, or namespaced-scoped + // resource the same namespace as the resource(s) being provisioned. + Name string `json:"name"` } // OpenStackClusterStackReleaseStatus defines the observed state of OpenStackClusterStackRelease. diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 904b458a..f39320c8 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -86,6 +86,7 @@ func (in *OpenStackClusterStackReleaseList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenStackClusterStackReleaseSpec) DeepCopyInto(out *OpenStackClusterStackReleaseSpec) { *out = *in + out.IdentityRef = in.IdentityRef } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackClusterStackReleaseSpec. @@ -219,6 +220,21 @@ func (in *OpenStackClusterStackReleaseTemplateStatus) DeepCopy() *OpenStackClust return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenStackIdentityReference) DeepCopyInto(out *OpenStackIdentityReference) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackIdentityReference. +func (in *OpenStackIdentityReference) DeepCopy() *OpenStackIdentityReference { + if in == nil { + return nil + } + out := new(OpenStackIdentityReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenStackNodeImageRelease) DeepCopyInto(out *OpenStackNodeImageRelease) { *out = *in diff --git a/config/crd/bases/infrastructure.clusterstack.x-k8s.io_openstackclusterstackreleases.yaml b/config/crd/bases/infrastructure.clusterstack.x-k8s.io_openstackclusterstackreleases.yaml index e5c81f85..418bcc54 100644 --- a/config/crd/bases/infrastructure.clusterstack.x-k8s.io_openstackclusterstackreleases.yaml +++ b/config/crd/bases/infrastructure.clusterstack.x-k8s.io_openstackclusterstackreleases.yaml @@ -40,10 +40,26 @@ spec: description: OpenStackClusterStackReleaseSpec defines the desired state of OpenStackClusterStackRelease. properties: - foo: - description: Foo is an example field of OpenStackClusterStackRelease. - Edit openstackclusterstackrelease_types.go to remove/update + cloudName: type: string + identityRef: + properties: + kind: + description: Kind of the identity. Must be supported by the infrastructure + provider and may be either cluster or namespace-scoped. + minLength: 1 + type: string + name: + description: Name of the infrastructure identity to be used. Must + be either a cluster-scoped resource, or namespaced-scoped resource + the same namespace as the resource(s) being provisioned. + type: string + required: + - kind + - name + type: object + required: + - cloudName type: object status: description: OpenStackClusterStackReleaseStatus defines the observed state diff --git a/config/crd/bases/infrastructure.clusterstack.x-k8s.io_openstackclusterstackreleasetemplates.yaml b/config/crd/bases/infrastructure.clusterstack.x-k8s.io_openstackclusterstackreleasetemplates.yaml index 08c88397..8929da87 100644 --- a/config/crd/bases/infrastructure.clusterstack.x-k8s.io_openstackclusterstackreleasetemplates.yaml +++ b/config/crd/bases/infrastructure.clusterstack.x-k8s.io_openstackclusterstackreleasetemplates.yaml @@ -45,10 +45,28 @@ spec: description: OpenStackClusterStackReleaseSpec defines the desired state of OpenStackClusterStackRelease. properties: - foo: - description: Foo is an example field of OpenStackClusterStackRelease. - Edit openstackclusterstackrelease_types.go to remove/update + cloudName: type: string + identityRef: + properties: + kind: + description: Kind of the identity. Must be supported by + the infrastructure provider and may be either cluster + or namespace-scoped. + minLength: 1 + type: string + name: + description: Name of the infrastructure identity to be + used. Must be either a cluster-scoped resource, or namespaced-scoped + resource the same namespace as the resource(s) being + provisioned. + type: string + required: + - kind + - name + type: object + required: + - cloudName type: object required: - spec