Skip to content

Commit

Permalink
feat: Update NSTemplateSet CRD (#445)
Browse files Browse the repository at this point in the history
* add templates references to nstemplateset status
  • Loading branch information
mfrancisc authored Sep 25, 2024
1 parent 978fc39 commit ce807b4
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 1 deletion.
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.

0 comments on commit ce807b4

Please sign in to comment.