Skip to content

Commit

Permalink
feat: add parameters to the TierTemplateRevision CRD (#451)
Browse files Browse the repository at this point in the history
* add parameters in TierTemplateRevision
---------

Co-authored-by: Devtools <[email protected]>
  • Loading branch information
mfrancisc and Devtools authored Dec 2, 2024
1 parent f6581d5 commit 5453178
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api/v1alpha1/docs/apiref.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1893,6 +1893,7 @@ TierTemplate creation.
.Appears In:
****
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatetierspec[$$NSTemplateTierSpec$$]
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-tiertemplaterevisionspec[$$TierTemplateRevisionSpec$$]
****

[cols="20a,50a,15a,15a", options="header"]
Expand Down Expand Up @@ -3207,6 +3208,7 @@ TierTemplateRevisionSpec defines the desired state of TierTemplateRevision
| Field | Description | Default | Validation
| *`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. +
The template parameters values will be defined in the NSTemplateTier CRD. + | |
| *`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. + | |
|===


Expand Down
8 changes: 8 additions & 0 deletions api/v1alpha1/tiertemplaterevision_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ type TierTemplateRevisionSpec struct {
// +listType=atomic
// +kubebuilder:pruning:PreserveUnknownFields
TemplateObjects []runtime.RawExtension `json:"templateObjects,omitempty" protobuf:"bytes,3,opt,name=templateObjects"`

// Parameters is an optional array of Parameters which will be used to replace the variables present in the TemplateObjects list when provisioning a Space.
// +optional
// +patchMergeKey=name
// +patchStrategy=merge
// +listType=map
// +listMapKey=name
Parameters []Parameter `json:"parameters,omitempty" protobuf:"bytes,4,opt,name=parameters" patchStrategy:"merge" patchMergeKey:"name"`
}

//+kubebuilder:object:root=true
Expand Down
5 changes: 5 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.

26 changes: 25 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 5453178

Please sign in to comment.