Skip to content

Commit

Permalink
Merge branch 'master' of github.com:codeready-toolchain/api into k8s_…
Browse files Browse the repository at this point in the history
…1_27_api
  • Loading branch information
ranakan19 committed Sep 23, 2024
2 parents 51aef59 + 978fc39 commit 647d61b
Show file tree
Hide file tree
Showing 4 changed files with 133 additions and 1 deletion.
31 changes: 31 additions & 0 deletions api/v1alpha1/docs/apiref.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,7 @@ NSTemplateTierSpec defines the desired state of NSTemplateTier
| *`clusterResources`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatetierclusterresources[$$NSTemplateTierClusterResources$$]__ | the cluster resources template (for cluster-wide quotas, etc.) + | |
| *`spaceRoles`* __object (keys:string, values:xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatetierspacerole[$$NSTemplateTierSpaceRole$$])__ | the templates to set the spaces roles, indexed by role + | |
| *`spaceRequestConfig`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-spacerequestconfig[$$SpaceRequestConfig$$]__ | SpaceRequestConfig stores all the configuration related to the Space Request feature + | |
| *`parameters`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-parameter[$$Parameter$$] array__ | Parameters is an optional array of Parameters to be used to replace "global" variables defined in the TierTemplate CRs of the NSTemplateTier. + | |
|===


Expand All @@ -1637,6 +1638,11 @@ NSTemplateTierStatus defines the observed state of NSTemplateTier
| *`conditions`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-condition[$$Condition$$] array__ | Conditions is an array of current NSTemplateTier conditions +
Supported condition types: ConditionReady + | |
| *`updates`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatetierhistory[$$NSTemplateTierHistory$$] array__ | Updates is an array of all NSTemplateTier updates + | |
| *`revisions`* __object (keys:string, values:string)__ | Revisions is a map of TierTemplate CR names (as the keys) and TierTemplateRevision CR names (as the values) +
The map represents the current content of the TierTemplate CRs combined with the parameters defined in the tier. +
Each of the referenced TierTemplateRevision CRs represents the content of the associated TierTemplate CR processed with the parameters. +
If the content of the already referenced TierTemplateRevision CR doesn't match the expected outcome of the processed TierTemplate CR, +
then a new TierTemplateRevision CR is created and the name here is updated. + | |
|===


Expand Down Expand Up @@ -1842,6 +1848,31 @@ OpenShiftRouteTarget captures the look up information for retrieving an OpenShif
|===


[id="{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-parameter"]
==== Parameter



Parameter defines a name/value variable that is to be processed during
TierTemplate creation.



.Appears In:
****
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-nstemplatetierspec[$$NSTemplateTierSpec$$]
****

[cols="20a,50a,15a,15a", options="header"]
|===
| Field | Description | Default | Validation
| *`name`* __string__ | Name must be set and it can be referenced in the TierTemplate +
content using {{.NAME}} + | |
| *`value`* __string__ | Value holds the Parameter data. +
The value replaces all occurrences of the Parameter {{.NAME}}. + | |
|===


[id="{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-pod"]
==== Pod

Expand Down
29 changes: 29 additions & 0 deletions api/v1alpha1/nstemplatetier_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,26 @@ type NSTemplateTierSpec struct {
// SpaceRequestConfig stores all the configuration related to the Space Request feature
// +optional
SpaceRequestConfig *SpaceRequestConfig `json:"spaceRequestConfig,omitempty"`

// Parameters is an optional array of Parameters to be used to replace "global" variables defined in the TierTemplate CRs of the NSTemplateTier.
// +optional
// +patchMergeKey=name
// +patchStrategy=merge
// +listType=map
// +listMapKey=name
Parameters []Parameter `json:"parameters,omitempty" protobuf:"bytes,4,opt,name=parameters" patchStrategy:"merge" patchMergeKey:"name"`
}

// Parameter defines a name/value variable that is to be processed during
// TierTemplate creation.
type Parameter struct {
// Name must be set and it can be referenced in the TierTemplate
// content using {{.NAME}}
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`

// Value holds the Parameter data.
// The value replaces all occurrences of the Parameter {{.NAME}}.
Value string `json:"value" protobuf:"bytes,4,opt,name=value"`
}

// SpaceRequestConfig contains all the configuration related to the Space Request feature
Expand Down Expand Up @@ -76,6 +96,15 @@ type NSTemplateTierStatus struct {
// +listType=map
// +listMapKey=startTime
Updates []NSTemplateTierHistory `json:"updates,omitempty" patchStrategy:"merge" patchMergeKey:"startTime"`

// Revisions is a map of TierTemplate CR names (as the keys) and TierTemplateRevision CR names (as the values)
// The map represents the current content of the TierTemplate CRs combined with the parameters defined in the tier.
// Each of the referenced TierTemplateRevision CRs represents the content of the associated TierTemplate CR processed with the parameters.
// If the content of the already referenced TierTemplateRevision CR doesn't match the expected outcome of the processed TierTemplate CR,
// then a new TierTemplateRevision CR is created and the name here is updated.
// +optional
// +mapType=atomic
Revisions map[string]string `json:"revisions,omitempty"`
}

// NSTemplateTierHistory a track record of an update
Expand Down
27 changes: 27 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.

47 changes: 46 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 647d61b

Please sign in to comment.