diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index f21c584a..00000000 Binary files a/.DS_Store and /dev/null differ diff --git a/api/v1alpha1/nstemplatetier_types.go b/api/v1alpha1/nstemplatetier_types.go index 1ea048f3..164c6194 100644 --- a/api/v1alpha1/nstemplatetier_types.go +++ b/api/v1alpha1/nstemplatetier_types.go @@ -22,6 +22,18 @@ type NSTemplateTierSpec struct { // +optional // +mapType=atomic SpaceRoles map[string]NSTemplateTierSpaceRole `json:"spaceRoles,omitempty"` + + // SpaceRequestConfig stores all the configuration related to the Space Request feature + // +optional + SpaceRequestConfig *SpaceRequestConfig `json:"spaceRequestConfig,omitempty"` +} + +// SpaceRequestConfig contains all the configuration related to the Space Request feature +// +k8s:openapi-gen=true +type SpaceRequestConfig struct { + // Provides the name of the Service Account whose token is to be copied + // +optional + ServiceAccountName string `json:"serviceAccountName,omitempty"` } // NSTemplateTierNamespace the namespace definition in an NSTemplateTier resource diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 33a5fc5d..18b86f05 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1508,6 +1508,11 @@ func (in *NSTemplateTierSpec) DeepCopyInto(out *NSTemplateTierSpec) { (*out)[key] = val } } + if in.SpaceRequestConfig != nil { + in, out := &in.SpaceRequestConfig, &out.SpaceRequestConfig + *out = new(SpaceRequestConfig) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NSTemplateTierSpec. @@ -2673,6 +2678,21 @@ func (in *SpaceRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SpaceRequestConfig) DeepCopyInto(out *SpaceRequestConfig) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpaceRequestConfig. +func (in *SpaceRequestConfig) DeepCopy() *SpaceRequestConfig { + if in == nil { + return nil + } + out := new(SpaceRequestConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SpaceRequestList) DeepCopyInto(out *SpaceRequestList) { *out = *in diff --git a/api/v1alpha1/zz_generated.openapi.go b/api/v1alpha1/zz_generated.openapi.go index 230e1f21..285dd454 100644 --- a/api/v1alpha1/zz_generated.openapi.go +++ b/api/v1alpha1/zz_generated.openapi.go @@ -106,6 +106,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/codeready-toolchain/api/api/v1alpha1.SpaceBindingStatus": schema_codeready_toolchain_api_api_v1alpha1_SpaceBindingStatus(ref), "github.com/codeready-toolchain/api/api/v1alpha1.SpaceConfig": schema_codeready_toolchain_api_api_v1alpha1_SpaceConfig(ref), "github.com/codeready-toolchain/api/api/v1alpha1.SpaceRequest": schema_codeready_toolchain_api_api_v1alpha1_SpaceRequest(ref), + "github.com/codeready-toolchain/api/api/v1alpha1.SpaceRequestConfig": schema_codeready_toolchain_api_api_v1alpha1_SpaceRequestConfig(ref), "github.com/codeready-toolchain/api/api/v1alpha1.SpaceRequestSpec": schema_codeready_toolchain_api_api_v1alpha1_SpaceRequestSpec(ref), "github.com/codeready-toolchain/api/api/v1alpha1.SpaceRequestStatus": schema_codeready_toolchain_api_api_v1alpha1_SpaceRequestStatus(ref), "github.com/codeready-toolchain/api/api/v1alpha1.SpaceSpec": schema_codeready_toolchain_api_api_v1alpha1_SpaceSpec(ref), @@ -2075,12 +2076,18 @@ func schema_codeready_toolchain_api_api_v1alpha1_NSTemplateTierSpec(ref common.R }, }, }, + "spaceRequestConfig": { + SchemaProps: spec.SchemaProps{ + Description: "SpaceRequestConfig stores all the configuration related to the Space Request feature", + Ref: ref("github.com/codeready-toolchain/api/api/v1alpha1.SpaceRequestConfig"), + }, + }, }, Required: []string{"namespaces"}, }, }, Dependencies: []string{ - "github.com/codeready-toolchain/api/api/v1alpha1.NSTemplateTierClusterResources", "github.com/codeready-toolchain/api/api/v1alpha1.NSTemplateTierNamespace", "github.com/codeready-toolchain/api/api/v1alpha1.NSTemplateTierSpaceRole"}, + "github.com/codeready-toolchain/api/api/v1alpha1.NSTemplateTierClusterResources", "github.com/codeready-toolchain/api/api/v1alpha1.NSTemplateTierNamespace", "github.com/codeready-toolchain/api/api/v1alpha1.NSTemplateTierSpaceRole", "github.com/codeready-toolchain/api/api/v1alpha1.SpaceRequestConfig"}, } } @@ -3698,6 +3705,26 @@ func schema_codeready_toolchain_api_api_v1alpha1_SpaceRequest(ref common.Referen } } +func schema_codeready_toolchain_api_api_v1alpha1_SpaceRequestConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SpaceRequestConfig contains all the configuration related to the Space Request feature", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "serviceAccountName": { + SchemaProps: spec.SchemaProps{ + Description: "Provides the name of the Service Account whose token is to be copied", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + func schema_codeready_toolchain_api_api_v1alpha1_SpaceRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{