Skip to content

Commit

Permalink
Add ILM policy setting to data_stream manifest file (#90)
Browse files Browse the repository at this point in the history
Add ILM policy setting to data_stream manifest file
  • Loading branch information
nnamdifrankie authored Dec 8, 2020
1 parent 8bcecde commit 765eb16
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 1 deletion.
2 changes: 1 addition & 1 deletion code/go/internal/spec/statik.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_size": "10gb",
"max_age": "1d"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- name: source
title: Source
group: 2
type: group
fields:
- name: geo.city_name
level: core
type: keyword
description: City name.
ignore_above: 1024
- name: foobar
type: text
description: A field with a pattern defined
pattern: '^[a-zA-Z]$'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
title: Hidden data stream and ilm policy overrride
type: metrics
ilm_policy: diagnostics
elasticsearch:
index_template.mappings:
dynamic: false
3 changes: 3 additions & 0 deletions versions/1/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
- description: Allow `condition` under inputs.
type: enhancement
link: https://github.com/elastic/package-spec/pull/87
- description: Add `ilm_policy` to data stream manifest.yml
type: enhancement
link: https://github.com/elastic/package-spec/pull/90
- description: Add `hidden` fields to data stream manifest file.
type: enhancement
link: https://github.com/elastic/package-spec/pull/91
5 changes: 5 additions & 0 deletions versions/1/data_stream/manifest.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ spec:
- beta
examples:
- beta
ilm_policy:
description: The name of an existing ILM (Index Lifecycle Management) policy
type: string
examples:
- diagnostics
type:
description: Type of data stream
type: string
Expand Down
16 changes: 16 additions & 0 deletions versions/1/data_stream/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ spec:
name: elasticsearch
additionalContents: false
contents:
- description: Folder containing Elasticsearch ILM Policy Definition
type: folder
name: ilm
additionalContents: false
contents:
- description: Supporting ILM policy definitions in YAML
type: file
pattern: '^.+\.yml$'
# TODO Determine if special handling of `---` is required (issue: https://github.com/elastic/package-spec/pull/54)
contentMediaType: "application/x-yaml; require-document-dashes=true"
required: false
- description: Supporting ILM policy definitions in JSON
type: file
pattern: '^.+\.json$'
contentMediaType: "application/json"
required: false
- description: Folder containing Elasticsearch Ingest Node pipeline definitions
type: folder
name: ingest_pipeline
Expand Down

0 comments on commit 765eb16

Please sign in to comment.