Skip to content

Commit 5453178

Browse files
mfranciscDevtools
andauthored
feat: add parameters to the TierTemplateRevision CRD (#451)
* add parameters in TierTemplateRevision --------- Co-authored-by: Devtools <devtools@redhat.com>
1 parent f6581d5 commit 5453178

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

api/v1alpha1/docs/apiref.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,6 +1893,7 @@ TierTemplate creation.
18931893
.Appears In:
18941894
****
18951895
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatetierspec[$$NSTemplateTierSpec$$]
1896+
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-tiertemplaterevisionspec[$$TierTemplateRevisionSpec$$]
18961897
****
18971898

18981899
[cols="20a,50a,15a,15a", options="header"]
@@ -3207,6 +3208,7 @@ TierTemplateRevisionSpec defines the desired state of TierTemplateRevision
32073208
| Field | Description | Default | Validation
32083209
| *`templateObjects`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#rawextension-runtime-pkg[$$RawExtension$$] array__ | TemplateObjects contains list of Unstructured Objects that can be parsed at runtime and will be applied as part of the tier provisioning. +
32093210
The template parameters values will be defined in the NSTemplateTier CRD. + | |
3211+
| *`parameters`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-parameter[$$Parameter$$] array__ | Parameters is an optional array of Parameters which will be used to replace the variables present in the TemplateObjects list when provisioning a Space. + | |
32103212
|===
32113213

32123214

api/v1alpha1/tiertemplaterevision_types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ type TierTemplateRevisionSpec struct {
2929
// +listType=atomic
3030
// +kubebuilder:pruning:PreserveUnknownFields
3131
TemplateObjects []runtime.RawExtension `json:"templateObjects,omitempty" protobuf:"bytes,3,opt,name=templateObjects"`
32+
33+
// Parameters is an optional array of Parameters which will be used to replace the variables present in the TemplateObjects list when provisioning a Space.
34+
// +optional
35+
// +patchMergeKey=name
36+
// +patchStrategy=merge
37+
// +listType=map
38+
// +listMapKey=name
39+
Parameters []Parameter `json:"parameters,omitempty" protobuf:"bytes,4,opt,name=parameters" patchStrategy:"merge" patchMergeKey:"name"`
3240
}
3341

3442
//+kubebuilder:object:root=true

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1alpha1/zz_generated.openapi.go

Lines changed: 25 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)