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
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
mfrancisc marked this conversation as resolved.
Show resolved Hide resolved
// +optional
// +listType=atomic
Namespaces []NSTemplateSetNamespace `json:"namespaces"`
mfrancisc marked this conversation as resolved.
Show resolved Hide resolved

// the cluster resources template (for cluster-wide quotas, etc.) provisioned for the current NSTemplateSet CR
mfrancisc marked this conversation as resolved.
Show resolved Hide resolved
// +optional
ClusterResources *NSTemplateSetClusterResources `json:"clusterResources,omitempty"`

// the role template and the users to whom the templates was applied for the current NSTemplateSet CR
mfrancisc marked this conversation as resolved.
Show resolved Hide resolved
// +optional
// +listType=atomic
SpaceRoles []NSTemplateSetSpaceRole `json:"spaceRoles,omitempty"`

// FeatureToggles holds the list of feature toggles/flags enabled for the current NSTemplateSet CR
mfrancisc marked this conversation as resolved.
Show resolved Hide resolved
// +optional
// +patchMergeKey=name
// +patchStrategy=merge
// +listType=map
// +listMapKey=name
FeatureToggles []FeatureToggle `json:"featureToggles,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
mfrancisc marked this conversation as resolved.
Show resolved Hide resolved

// 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.

Loading