diff --git a/spec/changelog.yml b/spec/changelog.yml index 16797f49..696ec167 100644 --- a/spec/changelog.yml +++ b/spec/changelog.yml @@ -2,6 +2,11 @@ ## This file documents changes in the package specification. It is NOT a package specification file. ## Newer entries go at the bottom of each in-development version. ## +- version: 2.0.0-next + changes: + - description: Add setting to configure the source mode of a data stream + type: enhancement + link: https://github.com/elastic/package-spec/issues/340 - version: 2.0.0-rc2 changes: - description: Add map as another reference type to check to show warnings diff --git a/spec/integration/data_stream/manifest.spec.yml b/spec/integration/data_stream/manifest.spec.yml index b54411cc..5cb27c5f 100644 --- a/spec/integration/data_stream/manifest.spec.yml +++ b/spec/integration/data_stream/manifest.spec.yml @@ -222,5 +222,19 @@ spec: type: array items: type: string + source_mode: + description: |- + Source mode to use. This configures how the document source (`_source`) is stored + for this data stream. + If configured as `default`, this mode is not configured and it uses Elasticsearch defaults. + If configured as `synthetic`, it enables [synthetic source](https://www.elastic.co/guide/en/elasticsearch/reference/8.4/mapping-source-field.html#synthetic-source), + that doesn't store the source, but tries to rebuild it from the indexed fields when queried. + If no configured or set to `synthetic`, users may override the setting from Fleet UI. + type: string + enum: + - "default" + - "synthetic" + examples: + - "synthetic" required: - title diff --git a/test/packages/good/data_stream/k8s_data_stream/manifest.yml b/test/packages/good/data_stream/k8s_data_stream/manifest.yml index 9348ebc2..bedfa836 100644 --- a/test/packages/good/data_stream/k8s_data_stream/manifest.yml +++ b/test/packages/good/data_stream/k8s_data_stream/manifest.yml @@ -12,3 +12,5 @@ streams: default: /server-status title: Nginx access logs description: Collect Nginx access logs +elasticsearch: + source_mode: "default" diff --git a/test/packages/time_series/data_stream/example/manifest.yml b/test/packages/time_series/data_stream/example/manifest.yml index 3a3147c6..a4d2bbeb 100644 --- a/test/packages/time_series/data_stream/example/manifest.yml +++ b/test/packages/time_series/data_stream/example/manifest.yml @@ -11,6 +11,7 @@ streams: default: 10s elasticsearch: + source_mode: "synthetic" index_mode: "time_series" index_template: settings: