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

[Fleet] Support new subscription and license fields #137799

Merged
merged 14 commits into from
Sep 20, 2022
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
88 changes: 67 additions & 21 deletions x-pack/plugins/fleet/common/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,18 @@
]
},
"savedObject": {
"type": "object"
},
"latestVersion": {
"type": "string"
},
"keepPoliciesUpToDate": {
"type": "boolean"
},
"notice": {
"type": "string"
},
"licensePath": {
"type": "string"
}
},
Expand Down Expand Up @@ -4194,6 +4206,26 @@
"version": {
"type": "string"
},
"release": {
"type": "string",
"enum": [
"experimental",
"beta",
"ga"
]
},
"source": {
"type": "object",
"properties": {
"license": {
"type": "string",
"enum": [
"Apache-2.0",
"Elastic-2.0"
]
}
}
},
"readme": {
"type": "string"
},
Expand All @@ -4209,34 +4241,32 @@
"type": "string"
}
},
"requirement": {
"oneOf": [
{
"conditions": {
"type": "object",
"properties": {
"kibana": {
"type": "object",
"properties": {
"kibana": {
"type": "object",
"properties": {
"versions": {
"type": "string"
}
}
"versions": {
"type": "string"
}
}
},
{
"elasticsearch": {
"type": "object",
"properties": {
"elasticsearch": {
"type": "object",
"properties": {
"versions": {
"type": "string"
}
}
"subscription": {
"type": "string",
"enum": [
"basic",
"gold",
"platinum",
"enterprise"
]
}
}
}
],
"type": "object"
}
},
"screenshots": {
"type": "array",
Expand Down Expand Up @@ -4340,6 +4370,22 @@
},
"path": {
"type": "string"
},
"elasticsearch": {
"type": "object",
"properties": {
"privileges": {
"type": "object",
"properties": {
"cluster": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"required": [
Expand All @@ -4349,7 +4395,7 @@
"description",
"type",
"categories",
"requirement",
"conditions",
"assets",
"format_version",
"download",
Expand Down
65 changes: 50 additions & 15 deletions x-pack/plugins/fleet/common/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,14 @@ paths:
- install_failed
- not_installed
savedObject:
type: object
latestVersion:
type: string
keepPoliciesUpToDate:
type: boolean
notice:
type: string
licensePath:
type: string
required:
- status
Expand Down Expand Up @@ -2623,6 +2631,20 @@ components:
type: string
version:
type: string
release:
type: string
enum:
- experimental
- beta
- ga
source:
type: object
properties:
license:
type: string
enum:
- Apache-2.0
- Elastic-2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

are these the only possible values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

readme:
type: string
description:
Expand All @@ -2633,21 +2655,24 @@ components:
type: array
items:
type: string
requirement:
oneOf:
- properties:
kibana:
type: object
properties:
versions:
type: string
- properties:
elasticsearch:
type: object
properties:
versions:
type: string
conditions:
type: object
properties:
kibana:
type: object
properties:
versions:
type: string
elasticsearch:
type: object
properties:
subscription:
type: string
enum:
- basic
- gold
- platinum
- enterprise
screenshots:
type: array
items:
Expand Down Expand Up @@ -2718,14 +2743,24 @@ components:
type: string
path:
type: string
elasticsearch:
type: object
properties:
privileges:
type: object
properties:
cluster:
type: array
items:
type: string
required:
- name
- title
- version
- description
- type
- categories
- requirement
- conditions
- assets
- format_version
- download
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ properties:
type: string
version:
type: string
release:
type: string
enum:
- experimental
- beta
- ga
source:
type: object
properties:
license:
type: string
enum:
- Apache-2.0
- Elastic-2.0
readme:
type: string
description:
Expand All @@ -17,21 +31,24 @@ properties:
type: array
items:
type: string
requirement:
oneOf:
- properties:
kibana:
type: object
properties:
versions:
type: string
- properties:
elasticsearch:
type: object
properties:
versions:
type: string
conditions:
type: object
properties:
kibana:
type: object
properties:
versions:
type: string
elasticsearch:
type: object
properties:
subscription:
type: string
enum:
- basic
- gold
- platinum
- enterprise
screenshots:
type: array
items:
Expand Down Expand Up @@ -102,14 +119,24 @@ properties:
type: string
path:
type: string
elasticsearch:
type: object
properties:
privileges:
type: object
properties:
cluster:
type: array
items:
type: string
required:
- name
- title
- version
- description
- type
- categories
- requirement
- conditions
- assets
- format_version
- download
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ get:
- install_failed
- not_installed
savedObject:
type: object
latestVersion:
type: string
keepPoliciesUpToDate:
type: boolean
notice:
type: string
licensePath:
type: string
required:
- status
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/fleet/common/types/models/epm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export type DetailViewPanelName =
| 'api-reference';
export type ServiceName = 'kibana' | 'elasticsearch';
export type AgentAssetType = typeof agentAssetTypes;
export type DocAssetType = 'doc' | 'notice';
export type DocAssetType = 'doc' | 'notice' | 'license';
export type AssetType =
| KibanaAssetType
| ElasticsearchAssetType
Expand Down Expand Up @@ -404,6 +404,7 @@ export interface EpmPackageAdditions {
latestVersion: string;
assets: AssetsGroupedByServiceByType;
notice?: string;
licensePath?: string;
keepPoliciesUpToDate?: boolean;
}

Expand Down
15 changes: 10 additions & 5 deletions x-pack/plugins/fleet/common/types/models/package_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export interface PackageSpecManifest {
description: string;
version: string;
license?: 'basic';
source?: {
license: string;
};
type?: 'integration' | 'input';
release?: 'experimental' | 'beta' | 'ga';
categories?: Array<PackageSpecCategory | undefined>;
Expand Down Expand Up @@ -54,12 +57,14 @@ export type PackageSpecCategory =
| 'version_control'
| 'web';

export type PackageSpecConditions = Record<
'kibana',
{
export interface PackageSpecConditions {
kibana: {
version: string;
}
>;
};
elastic?: {
subscription: string;
};
}

export interface PackageSpecIcon {
src: string;
Expand Down
Loading