-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial definition of content pack[age]s (#777)
On this initial version, they only support the distribution of kibana assets, like dashboards. This package type introduces a discovery mechanism based on the data the package can work with. For example the following definition would indicate that the package provides resources that are useful when used with data that includes the field `process.pid`: ``` discovery: fields: - name: "process.pid" ``` The package registry could add support to look for packages that have support for certain fields. For example a request like the following one could be used to discover packages that include resources that can leverage the `process.pid` or the `user.id` fields. ``` GET /search?discovery=fields:process.pid,user.id ```
- Loading branch information
Showing
20 changed files
with
282 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
spec: | ||
additionalContents: false | ||
contents: | ||
- description: Folder containing Kibana dashboard assets | ||
type: folder | ||
name: dashboard | ||
required: false | ||
contents: | ||
- description: A dashboard asset file | ||
type: file | ||
contentMediaType: "application/json" | ||
pattern: '^{PACKAGE_NAME}-.+\.json$' | ||
forbiddenPatterns: | ||
- '^.+-(ecs|ECS)\.json$' # ECS suffix is forbidden | ||
- description: File containing saved object tag definitions for assets | ||
type: file | ||
contentMediaType: "application/x-yaml" | ||
name: "tags.yml" | ||
required: false | ||
$ref: "../../integration/kibana/tags.spec.yml" | ||
- description: Folder containing Kibana SLO assets | ||
type: folder | ||
name: slo | ||
required: false | ||
contents: | ||
- description: An SLO asset file | ||
type: file | ||
contentMediaType: "application/json" | ||
pattern: '^{PACKAGE_NAME}-.+\.json$' | ||
forbiddenPatterns: | ||
- '^.+-(ecs|ECS)\.json$' # ECS suffix is forbidden |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
## | ||
## Describes the specification for the content package's main manifest.yml file | ||
## | ||
spec: | ||
# Everything under here follows JSON schema (https://json-schema.org/), written as YAML for readability | ||
type: object | ||
additionalProperties: false | ||
definitions: | ||
discovery: | ||
description: > | ||
Description of the data this package can be used with. It can be used to discover | ||
the package from elements in the existing data. | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
fields: | ||
description: Description of the fields this package can be used with. | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
name: | ||
description: Name of the field. | ||
type: string | ||
properties: | ||
format_version: | ||
description: The version of the package specification format used by this package. | ||
$ref: "../integration/manifest.spec.yml#/definitions/version" | ||
name: | ||
description: The name of the package. | ||
type: string | ||
pattern: '^[a-z0-9_]+$' | ||
examples: | ||
- apache | ||
title: | ||
$ref: "../integration/manifest.spec.yml#/definitions/title" | ||
description: | ||
$ref: "../integration/manifest.spec.yml#/definitions/description" | ||
version: | ||
description: The version of the package. | ||
$ref: "../integration/manifest.spec.yml#/definitions/version" | ||
source: | ||
$ref: "../integration/manifest.spec.yml#/definitions/source" | ||
type: | ||
description: The type of package. | ||
type: string | ||
enum: | ||
- content | ||
examples: | ||
- content | ||
categories: | ||
$ref: "../integration/manifest.spec.yml#/definitions/categories" | ||
conditions: | ||
$ref: "../integration/manifest.spec.yml#/definitions/conditions" | ||
discovery: | ||
$ref: "#/definitions/discovery" | ||
icons: | ||
$ref: "../integration/manifest.spec.yml#/definitions/icons" | ||
screenshots: | ||
$ref: "../integration/manifest.spec.yml#/definitions/screenshots" | ||
owner: | ||
$ref: "../integration/manifest.spec.yml#/definitions/owner" | ||
required: | ||
- format_version | ||
- name | ||
- title | ||
- description | ||
- version | ||
- type | ||
- owner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
## | ||
## Entrypoint of "content packages" specification. | ||
## The specification is considered "beta" at the moment, so it may change until we release it as GA. | ||
## | ||
## Describes the folders and files that make up a package. | ||
## | ||
spec: | ||
additionalContents: false | ||
totalContentsLimit: 65535 | ||
totalSizeLimit: 250MB | ||
sizeLimit: 150MB | ||
configurationSizeLimit: 5MB | ||
relativePathSizeLimit: 3MB | ||
release: beta | ||
contents: | ||
- description: The main package manifest file | ||
type: file | ||
contentMediaType: "application/x-yaml" | ||
sizeLimit: 5MB | ||
name: "manifest.yml" | ||
required: true | ||
$ref: "./manifest.spec.yml" | ||
- description: The package's CHANGELOG file | ||
type: file | ||
contentMediaType: "application/x-yaml" | ||
name: "changelog.yml" | ||
required: true | ||
$ref: "../integration/changelog.spec.yml" | ||
- description: The package's license file | ||
type: file | ||
contentMediaType: "text/plain" | ||
name: "LICENSE.txt" | ||
required: false | ||
- description: Folder containing documentation for the package | ||
type: folder | ||
name: docs | ||
required: true | ||
$ref: "../integration/docs/spec.yml" | ||
- description: Folder containing images for the package | ||
type: folder | ||
name: img | ||
required: false | ||
$ref: "../integration/img/spec.yml" | ||
- description: Folder containing Kibana assets provided by the package | ||
type: folder | ||
name: kibana | ||
required: false | ||
$ref: "./kibana/spec.yml" | ||
- description: Configuration file to process the results returned from the package validation. This file is just for package validation and it should be ignored when installing or using the package. | ||
type: file | ||
contentMediaType: "application/x-yaml" | ||
name: "validation.yml" | ||
required: false | ||
$ref: "../integration/validation.spec.yml" | ||
|
||
versions: | ||
- before: 3.4.0 | ||
patch: | ||
- op: remove | ||
path: "/contents" # Package type not available before this version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
spec: | ||
additionalContents: false | ||
contents: | ||
- description: Main README file | ||
type: file | ||
contentMediaType: "text/markdown" | ||
name: "README.md" | ||
required: true | ||
- description: Other README files (can be used by policy templates) | ||
type: file | ||
contentMediaType: "text/markdown" | ||
pattern: '^.+.md' | ||
required: false | ||
spec: | ||
additionalContents: false | ||
contents: | ||
- description: Main README file | ||
type: file | ||
contentMediaType: "text/markdown" | ||
name: "README.md" | ||
required: true | ||
- description: Other README files (can be used by policy templates) | ||
type: file | ||
contentMediaType: "text/markdown" | ||
pattern: '^.+.md' | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
spec: | ||
additionalContents: true # TODO: Add definition for this dir? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- version: 0.1.0 | ||
changes: | ||
- description: Initial release | ||
type: enhancement | ||
link: https://github.com/elastic/package-spec/pull/777 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Reference package of content type |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.