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

Add condition to define stack capability requirements #561

Merged
merged 2 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions spec/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +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.9.1-next
- version: 2.10.0-next
changes:
- description: Prepare for next version
- description: Packages can define required stack capabilities
type: enhancement
link: https://github.com/elastic/package-spec/pull/547
link: https://github.com/elastic/package-spec/pull/561
- version: 2.9.0
changes:
- description: Update minimum kibana version required for runtime fields
Expand Down
20 changes: 20 additions & 0 deletions spec/integration/manifest.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,22 @@ spec:
default: basic
examples:
- basic
capabilities:
description: |-
Stack features that are required by the package to work properly.
andrewkroh marked this conversation as resolved.
Show resolved Hide resolved
The package should not be used in deployments without the indicated features.
Packages that don't indicate any capability condition can be used on any deployment.
type: array
uniqueItems: true
items:
type: string
enum:
- apm
- enterprise_search
- observability
- security
- serverless_search
- uptime
kibana:
description: Kibana conditions
type: object
Expand Down Expand Up @@ -379,6 +395,10 @@ spec:

# JSON patches for newer versions should be placed on top
versions:
- before: 2.10.0
patch:
- op: remove
path: "/definitions/conditions/properties/elastic/properties/capabilities"
- before: 2.3.0
patch:
- op: add
Expand Down
3 changes: 2 additions & 1 deletion test/packages/good_input/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
format_version: 2.9.0
format_version: 2.10.0
name: good_input
title: good_input
description: >-
Expand All @@ -9,6 +9,7 @@ source:
license: "Apache-2.0"
conditions:
elastic.subscription: basic
elastic.capabilities: [observability]
kibana:
version: "^8.10.0"
categories:
Expand Down
4 changes: 3 additions & 1 deletion test/packages/good_v2/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
format_version: 2.9.0
format_version: 2.10.0
name: good_v2
title: Good package
description: This package is good for format version 2
Expand All @@ -9,6 +9,8 @@ source:
conditions:
kibana.version: '^8.10.0'
elastic.subscription: 'basic'
elastic.capabilities:
- observability
vars:
- name: package_password
type: password
Expand Down