Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update NSTemplateSet CRD #445

Merged
merged 13 commits into from
Sep 25, 2024
7 changes: 7 additions & 0 deletions api/v1alpha1/docs/apiref.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,7 @@ NSTemplateSetClusterResources defines the cluster-scoped resources associated wi
.Appears In:
****
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatesetspec[$$NSTemplateSetSpec$$]
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatesetstatus[$$NSTemplateSetStatus$$]
****

[cols="20a,50a,15a,15a", options="header"]
Expand Down Expand Up @@ -1377,6 +1378,7 @@ NSTemplateSetNamespace the namespace definition in an NSTemplateSet resource
.Appears In:
****
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatesetspec[$$NSTemplateSetSpec$$]
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatesetstatus[$$NSTemplateSetStatus$$]
****

[cols="20a,50a,15a,15a", options="header"]
Expand All @@ -1398,6 +1400,7 @@ NSTemplateSetSpaceRole the role template and the users to whom the templates sho
.Appears In:
****
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatesetspec[$$NSTemplateSetSpec$$]
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatesetstatus[$$NSTemplateSetStatus$$]
****

[cols="20a,50a,15a,15a", options="header"]
Expand Down Expand Up @@ -1449,6 +1452,10 @@ NSTemplateSetStatus defines the observed state of NSTemplateSet
[cols="20a,50a,15a,15a", options="header"]
|===
| Field | Description | Default | Validation
| *`namespaces`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatesetnamespace[$$NSTemplateSetNamespace$$] array__ | The namespace templates that were used last time to provision NSTemplateSet CR + | |
| *`clusterResources`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatesetclusterresources[$$NSTemplateSetClusterResources$$]__ | The cluster resources template (for cluster-wide quotas, etc.) that was used last time to provision the NSTemplateSet CR + | |
| *`spaceRoles`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatesetspacerole[$$NSTemplateSetSpaceRole$$] array__ | The SpaceRole template and the users to whom the template was applied for when the NSTemplateSet CR was provisioned for the last time + | |
| *`featureToggles`* __string array__ | FeatureToggles holds the list of feature toggles/flags that were enabled when the NSTemplateSet CR was provisioned for the last time + | |
| *`provisionedNamespaces`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-spacenamespace[$$SpaceNamespace$$] array__ | ProvisionedNamespaces is a list of Namespaces that were provisioned by the NSTemplateSet. + | |
| *`conditions`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-condition[$$Condition$$] array__ | Conditions is an array of current NSTemplateSet conditions +
Supported condition types: ConditionReady + | |
Expand Down
19 changes: 19 additions & 0 deletions api/v1alpha1/nstemplateset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,25 @@ type NSTemplateSetSpaceRole struct {
// NSTemplateSetStatus defines the observed state of NSTemplateSet
// +k8s:openapi-gen=true
type NSTemplateSetStatus struct {
// The namespace templates that were used last time to provision NSTemplateSet CR
// +optional
// +listType=atomic
Namespaces []NSTemplateSetNamespace `json:"namespaces,omitempty"`

// The cluster resources template (for cluster-wide quotas, etc.) that was used last time to provision the NSTemplateSet CR
// +optional
ClusterResources *NSTemplateSetClusterResources `json:"clusterResources,omitempty"`

// The SpaceRole template and the users to whom the template was applied for when the NSTemplateSet CR was provisioned for the last time
// +optional
// +listType=atomic
SpaceRoles []NSTemplateSetSpaceRole `json:"spaceRoles,omitempty"`

// FeatureToggles holds the list of feature toggles/flags that were enabled when the NSTemplateSet CR was provisioned for the last time
// +optional
// +listType=atomic
FeatureToggles []string `json:"featureToggles,omitempty"`

// ProvisionedNamespaces is a list of Namespaces that were provisioned by the NSTemplateSet.
// +optional
// +listType=atomic
Expand Down
22 changes: 22 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 65 additions & 1 deletion api/v1alpha1/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading