Skip to content

Commit

Permalink
Fix Component template documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
xco-sk authored Feb 5, 2024
1 parent 80c5039 commit c8575c0
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions docs/cr_component_template.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# Index Template (indextemplates.es.eck.github.com)
# Component Template (componenttemplates.es.eck.github.com)

Representation of the Index template resource.
Representation of the Component template resource.

## Lifecycle

Index template lifecycle is simple - when the template is deleted
Component template lifecycle is simple - when the template is deleted
from K8s, it is also deleted from ES.
Create and Update are done using the same `PUT /_index_template` API.
See [Create or update index template API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-template.html)
See [Create or update component template API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html)
in official documentation.

## Fields

| Key | Type | Description |
| -------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------ |
| `metadata.name` | string | Name of the Index Template |
| `spec.targetInstance.name` | string | Name of the [Elasticsearch Instance](cr_elasticsearch_instance.md) to which this IndexTemplate will be deployed to |
| `spec.body` | string | Component template definition - same you would use when creating component template using ES REST API |
| `spec.dependencies.indexTemplates` | list | List of index templates that have to be present in ES cluster before component template is created / updated |
| `spec.dependencies.indices` | list | List of indices that have to be present in ES cluster before component template is created / updated |
| `spec.dependencies.conponentTemplates` | list | List of component templates that have to be present in ES cluster before component template is created / updated |
| Key | Type | Description |
| -------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------- |
| `metadata.name` | string | Name of the Component Template |
| `spec.targetInstance.name` | string | Name of the [Elasticsearch Instance](cr_elasticsearch_instance.md) to which this ComponentTemplate will be deployed to |
| `spec.body` | string | Component template definition - same you would use when creating component template using ES REST API |
| `spec.dependencies.indexTemplates` | list | List of index templates that have to be present in ES cluster before component template is created / updated |
| `spec.dependencies.indices` | list | List of indices that have to be present in ES cluster before component template is created / updated |
| `spec.dependencies.conponentTemplates` | list | List of component templates that have to be present in ES cluster before component template is created / updated |

## Example

Expand Down

0 comments on commit c8575c0

Please sign in to comment.