Skip to content

Commit

Permalink
add templates references to nstemplateset status
Browse files Browse the repository at this point in the history
  • Loading branch information
Devtools committed Sep 17, 2024
1 parent d324d10 commit fce4f77
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 1 deletion.
8 changes: 8 additions & 0 deletions api/v1alpha1/docs/apiref.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ according to its weight.

.Appears In:
****
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatesetstatus[$$NSTemplateSetStatus$$]
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-tiersconfig[$$TiersConfig$$]
****

Expand Down Expand Up @@ -1333,6 +1334,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 +1379,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 +1401,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 +1453,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 provisioned for the current NSTemplateSet CR + | |
| *`clusterResources`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatesetclusterresources[$$NSTemplateSetClusterResources$$]__ | the cluster resources template (for cluster-wide quotas, etc.) provisioned for the current NSTemplateSet CR + | |
| *`spaceRoles`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatesetspacerole[$$NSTemplateSetSpaceRole$$] array__ | the role template and the users to whom the templates was applied for the current NSTemplateSet CR + | |
| *`featureToggles`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-featuretoggle[$$FeatureToggle$$] array__ | FeatureToggles holds the list of feature toggles/flags enabled for the current NSTemplateSet CR + | |
| *`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
22 changes: 22 additions & 0 deletions api/v1alpha1/nstemplateset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,28 @@ type NSTemplateSetSpaceRole struct {
// NSTemplateSetStatus defines the observed state of NSTemplateSet
// +k8s:openapi-gen=true
type NSTemplateSetStatus struct {
// The namespace templates provisioned for the current NSTemplateSet CR
// +optional
// +listType=atomic
Namespaces []NSTemplateSetNamespace `json:"namespaces"`

// the cluster resources template (for cluster-wide quotas, etc.) provisioned for the current NSTemplateSet CR
// +optional
ClusterResources *NSTemplateSetClusterResources `json:"clusterResources,omitempty"`

// the role template and the users to whom the templates was applied for the current NSTemplateSet CR
// +optional
// +listType=atomic
SpaceRoles []NSTemplateSetSpaceRole `json:"spaceRoles,omitempty"`

// FeatureToggles holds the list of feature toggles/flags enabled for the current NSTemplateSet CR
// +optional
// +patchMergeKey=name
// +patchStrategy=merge
// +listType=map
// +listMapKey=name
FeatureToggles []FeatureToggle `json:"featureToggles,omitempty" patchStrategy:"merge" patchMergeKey:"name"`

// ProvisionedNamespaces is a list of Namespaces that were provisioned by the NSTemplateSet.
// +optional
// +listType=atomic
Expand Down
24 changes: 24 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.

70 changes: 69 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 fce4f77

Please sign in to comment.