Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for links and connectors to be used by Kibana #834

Merged
merged 24 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions spec/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
- description: Add support for semantic_text field definition.
type: enhancement
link: https://github.com/elastic/package-spec/pull/807
- description: Add support for next steps links to kibana manifest.
type: enhancement
link: https://github.com/elastic/package-spec/pull/834
criamico marked this conversation as resolved.
Show resolved Hide resolved
- version: 3.3.1-next
changes:
- description: Add validation rule to ensure security capability is added if there is any security rule asset.
Expand Down
27 changes: 27 additions & 0 deletions spec/integration/manifest.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,33 @@ spec:
- access
deployment_modes:
$ref: "#/definitions/deployment_modes"
links:
criamico marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to add this new field also for input packages ?

Policy templates can be defined also in that package type:

policy_templates:

If so, this definition can be moved to the definitions key (as for instance how deployment_modes is defined) so it can be reused in input packages:

  • Probably it would be good to change the name under definitions since these are not generic links.

Examples on how to reuse/reference a field from definitions:

# in input manifest:
          links:
            $ref: "../integration/manifest.spec.yml#/definitions/policy_template_links"

# in integration manifest:
          links:
            $ref: "#/definitions/policy_template_links"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrodm I renamed links to configuration_links and moved it under the definitions field. It's now referenced both under inputs and policy templates.

description: List of links related to policy template.
type: array
minItems: 1
items:
type: object
additionalProperties: false
properties:
criamico marked this conversation as resolved.
Show resolved Hide resolved
title:
description: Link title
type: string
url:
description: Link url
type: string
type:
description: Type of link. `next_steps` for links to locations that can be relevant right after configuring the policy. `action` for actions that can be performed while the policy is in use.
type: string
enum:
- action
- next_step
content:
description: Link description
type: string
required:
- title
- url
- type
inputs:
description: List of inputs supported by policy template.
type: array
Expand Down
5 changes: 5 additions & 0 deletions test/packages/good_v3/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- version: 1.0.1
changes:
- description: Add kibana links
type: enhancement
link: https://github.com/elastic/package-spec/pull/834
- version: 1.0.0
changes:
- description: LTS version
Expand Down
8 changes: 6 additions & 2 deletions test/packages/good_v3/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ format_version: 3.4.0
name: good_v3
title: Good package
description: This package is good for format version 3
version: 1.0.0
version: 1.0.1
type: integration
source:
license: "Apache-2.0"
Expand Down Expand Up @@ -39,7 +39,11 @@ policy_templates:
organization: elastic
division: observability
team: obs-infraobs-integrations

links:
- title: Security overview
type: next_step
content: "View security overview"
url: "/security/overview"
criamico marked this conversation as resolved.
Show resolved Hide resolved
inputs:
- type: apache/metrics
title: Collect metrics from Apache instances
Expand Down