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

[8.x] [Fleet] delete unenrolled agents task #196072

Merged
merged 3 commits into from
Oct 14, 2024
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
14 changes: 14 additions & 0 deletions oas_docs/output/kibana.serverless.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13395,6 +13395,13 @@ paths:
properties:
additional_yaml_config:
type: string
delete_unenrolled_agents:
type: object
properties:
enabled:
type: boolean
is_preconfigured:
type: boolean
fleet_server_hosts:
description: Protocol and path must be the same for each URL
items:
Expand Down Expand Up @@ -21844,6 +21851,13 @@ components:
title: Settings
type: object
properties:
delete_unenrolled_agents:
type: object
properties:
enabled:
type: boolean
is_preconfigured:
type: boolean
fleet_server_hosts:
deprecated: true
items:
Expand Down
14 changes: 14 additions & 0 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13395,6 +13395,13 @@ paths:
properties:
additional_yaml_config:
type: string
delete_unenrolled_agents:
type: object
properties:
enabled:
type: boolean
is_preconfigured:
type: boolean
fleet_server_hosts:
description: Protocol and path must be the same for each URL
items:
Expand Down Expand Up @@ -21844,6 +21851,13 @@ components:
title: Settings
type: object
properties:
delete_unenrolled_agents:
type: object
properties:
enabled:
type: boolean
is_preconfigured:
type: boolean
fleet_server_hosts:
deprecated: true
items:
Expand Down
14 changes: 14 additions & 0 deletions oas_docs/output/kibana.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16823,6 +16823,13 @@ paths:
properties:
additional_yaml_config:
type: string
delete_unenrolled_agents:
type: object
properties:
enabled:
type: boolean
is_preconfigured:
type: boolean
fleet_server_hosts:
description: Protocol and path must be the same for each URL
items:
Expand Down Expand Up @@ -29623,6 +29630,13 @@ components:
title: Settings
type: object
properties:
delete_unenrolled_agents:
type: object
properties:
enabled:
type: boolean
is_preconfigured:
type: boolean
fleet_server_hosts:
deprecated: true
items:
Expand Down
14 changes: 14 additions & 0 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16823,6 +16823,13 @@ paths:
properties:
additional_yaml_config:
type: string
delete_unenrolled_agents:
type: object
properties:
enabled:
type: boolean
is_preconfigured:
type: boolean
fleet_server_hosts:
description: Protocol and path must be the same for each URL
items:
Expand Down Expand Up @@ -29623,6 +29630,13 @@ components:
title: Settings
type: object
properties:
delete_unenrolled_agents:
type: object
properties:
enabled:
type: boolean
is_preconfigured:
type: boolean
fleet_server_hosts:
deprecated: true
items:
Expand Down
7 changes: 4 additions & 3 deletions packages/kbn-check-mappings-update-cli/current_fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,7 @@
"payload.connector.type",
"type"
],
"cloud-security-posture-settings": [
"rules"
],
"cloud-security-posture-settings": [],
"config": [
"buildNum"
],
Expand Down Expand Up @@ -718,6 +716,9 @@
"vars"
],
"ingest_manager_settings": [
"delete_unenrolled_agents",
"delete_unenrolled_agents.enabled",
"delete_unenrolled_agents.is_preconfigured",
"fleet_server_hosts",
"has_seen_add_data_notice",
"output_secret_storage_requirements_met",
Expand Down
12 changes: 12 additions & 0 deletions packages/kbn-check-mappings-update-cli/current_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2373,6 +2373,18 @@
},
"ingest_manager_settings": {
"properties": {
"delete_unenrolled_agents": {
"properties": {
"enabled": {
"index": false,
"type": "boolean"
},
"is_preconfigured": {
"index": false,
"type": "boolean"
}
}
},
"fleet_server_hosts": {
"type": "keyword"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,7 @@ export async function checkIncompatibleMappings({
throw createFailError(
`Only mappings changes that are compatible with current mappings are allowed. Consider reaching out to the Kibana core team if you are stuck.`
);
} finally {
await esClient.indices.delete({ index: TEST_INDEX_NAME }).catch(() => {});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
"ingest-download-sources": "279a68147e62e4d8858c09ad1cf03bd5551ce58d",
"ingest-outputs": "daafff49255ab700e07491376fe89f04fc998b91",
"ingest-package-policies": "53a94064674835fdb35e5186233bcd7052eabd22",
"ingest_manager_settings": "e794576a05d19dd5306a1e23cbb82c09bffabd65",
"ingest_manager_settings": "111a616eb72627c002029c19feb9e6c439a10505",
"inventory-view": "b8683c8e352a286b4aca1ab21003115a4800af83",
"kql-telemetry": "93c1d16c1a0dfca9c8842062cf5ef8f62ae401ad",
"legacy-url-alias": "9b8cca3fbb2da46fd12823d3cd38fdf1c9f24bc8",
Expand Down
22 changes: 22 additions & 0 deletions x-pack/plugins/fleet/common/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,17 @@
},
"additional_yaml_config": {
"type": "string"
},
"delete_unenrolled_agents": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"is_preconfigured": {
"type": "boolean"
}
}
}
}
}
Expand Down Expand Up @@ -6187,6 +6198,17 @@
},
"prerelease_integrations_enabled": {
"type": "boolean"
},
"delete_unenrolled_agents": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"is_preconfigured": {
"type": "boolean"
}
}
}
},
"required": [
Expand Down
14 changes: 14 additions & 0 deletions x-pack/plugins/fleet/common/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ paths:
type: boolean
additional_yaml_config:
type: string
delete_unenrolled_agents:
type: object
properties:
enabled:
type: boolean
is_preconfigured:
type: boolean
responses:
'200':
description: OK
Expand Down Expand Up @@ -3866,6 +3873,13 @@ components:
type: string
prerelease_integrations_enabled:
type: boolean
delete_unenrolled_agents:
type: object
properties:
enabled:
type: boolean
is_preconfigured:
type: boolean
required:
- fleet_server_hosts
- id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ properties:
type: string
prerelease_integrations_enabled:
type: boolean
delete_unenrolled_agents:
type: object
properties:
enabled:
type: boolean
is_preconfigured:
type: boolean

required:
- fleet_server_hosts
- id
7 changes: 7 additions & 0 deletions x-pack/plugins/fleet/common/openapi/paths/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ put:
type: boolean
additional_yaml_config:
type: string
delete_unenrolled_agents:
type: object
properties:
enabled:
type: boolean
is_preconfigured:
type: boolean
responses:
'200':
description: OK
Expand Down
6 changes: 5 additions & 1 deletion x-pack/plugins/fleet/common/types/models/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
export interface BaseSettings {
has_seen_add_data_notice?: boolean;
fleet_server_hosts?: string[];
prerelease_integrations_enabled: boolean;
prerelease_integrations_enabled?: boolean;
}

export interface Settings extends BaseSettings {
Expand All @@ -19,4 +19,8 @@ export interface Settings extends BaseSettings {
output_secret_storage_requirements_met?: boolean;
use_space_awareness_migration_status?: 'pending' | 'success' | 'error';
use_space_awareness_migration_started_at?: string | null;
delete_unenrolled_agents?: {
enabled: boolean;
is_preconfigured: boolean;
};
}
Loading
Loading