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] delete unenrolled agents task #195544

Merged
merged 22 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
504da49
delete unenrolled agents task
juliaElastic Oct 9, 2024
d8d81bd
Merge branch 'main' into cleanup-unenrolled
juliaElastic Oct 9, 2024
4191916
[CI] Auto-commit changed files from 'node scripts/check_mappings_upda…
kibanamachine Oct 9, 2024
0061716
added delete flag to settings UI
juliaElastic Oct 9, 2024
ed96ae5
Merge branch 'main' into cleanup-unenrolled
juliaElastic Oct 9, 2024
11148b0
[CI] Auto-commit changed files from 'node scripts/jest_integration -u…
kibanamachine Oct 9, 2024
553161c
[CI] Auto-commit changed files from 'node scripts/capture_oas_snapsho…
kibanamachine Oct 9, 2024
76970c6
add test on task
juliaElastic Oct 9, 2024
22d2d85
more tests, make prerelease_integrations_enabled optional
juliaElastic Oct 9, 2024
8f20bca
fix types
juliaElastic Oct 9, 2024
8fe491a
[CI] Auto-commit changed files from 'make api-docs && make api-docs-s…
kibanamachine Oct 9, 2024
3c84092
fix test
juliaElastic Oct 9, 2024
4a6a2dd
Merge branch 'main' into cleanup-unenrolled
juliaElastic Oct 9, 2024
6fe1fc2
fix moving delete flag from true to false, add abortController
juliaElastic Oct 9, 2024
147c2d4
prevent delete flag to update from UI when preconfigured
juliaElastic Oct 10, 2024
8c25642
fix checks
juliaElastic Oct 10, 2024
3c604cc
update current_mappings
juliaElastic Oct 10, 2024
ebf978d
[CI] Auto-commit changed files from 'node scripts/capture_oas_snapsho…
kibanamachine Oct 10, 2024
42839cf
added finally block
juliaElastic Oct 10, 2024
b7b7eec
[CI] Auto-commit changed files from 'make api-docs && make api-docs-s…
kibanamachine Oct 10, 2024
5e5bb64
Merge branch 'main' into cleanup-unenrolled
juliaElastic Oct 11, 2024
3d5c4a0
Merge branch 'main' into cleanup-unenrolled
juliaElastic Oct 14, 2024
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
13 changes: 10 additions & 3 deletions oas_docs/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -26018,7 +26018,7 @@
},
"/api/fleet/logstash_api_keys": {
"post": {
"description": "Generate Logstash API keyy",
"description": "Generate Logstash API key",
"operationId": "%2Fapi%2Ffleet%2Flogstash_api_keys#0",
"parameters": [
{
Expand Down Expand Up @@ -40127,6 +40127,9 @@
"item": {
"additionalProperties": false,
"properties": {
"delete_unenrolled_agents": {
"type": "boolean"
},
"fleet_server_hosts": {
"items": {
"type": "string"
Expand Down Expand Up @@ -40173,7 +40176,6 @@
}
},
"required": [
"prerelease_integrations_enabled",
"id"
],
"type": "object"
Expand Down Expand Up @@ -40272,6 +40274,9 @@
"additional_yaml_config": {
"type": "string"
},
"delete_unenrolled_agents": {
"type": "boolean"
},
"fleet_server_hosts": {
"items": {
"format": "uri",
Expand Down Expand Up @@ -40311,6 +40316,9 @@
"item": {
"additionalProperties": false,
"properties": {
"delete_unenrolled_agents": {
"type": "boolean"
},
"fleet_server_hosts": {
"items": {
"type": "string"
Expand Down Expand Up @@ -40357,7 +40365,6 @@
}
},
"required": [
"prerelease_integrations_enabled",
"id"
],
"type": "object"
Expand Down
13 changes: 10 additions & 3 deletions oas_docs/bundle.serverless.json
Original file line number Diff line number Diff line change
Expand Up @@ -26018,7 +26018,7 @@
},
"/api/fleet/logstash_api_keys": {
"post": {
"description": "Generate Logstash API keyy",
"description": "Generate Logstash API key",
"operationId": "%2Fapi%2Ffleet%2Flogstash_api_keys#0",
"parameters": [
{
Expand Down Expand Up @@ -40127,6 +40127,9 @@
"item": {
"additionalProperties": false,
"properties": {
"delete_unenrolled_agents": {
"type": "boolean"
},
"fleet_server_hosts": {
"items": {
"type": "string"
Expand Down Expand Up @@ -40173,7 +40176,6 @@
}
},
"required": [
"prerelease_integrations_enabled",
"id"
],
"type": "object"
Expand Down Expand Up @@ -40272,6 +40274,9 @@
"additional_yaml_config": {
"type": "string"
},
"delete_unenrolled_agents": {
"type": "boolean"
},
"fleet_server_hosts": {
"items": {
"format": "uri",
Expand Down Expand Up @@ -40311,6 +40316,9 @@
"item": {
"additionalProperties": false,
"properties": {
"delete_unenrolled_agents": {
"type": "boolean"
},
"fleet_server_hosts": {
"items": {
"type": "string"
Expand Down Expand Up @@ -40357,7 +40365,6 @@
}
},
"required": [
"prerelease_integrations_enabled",
"id"
],
"type": "object"
Expand Down
10 changes: 7 additions & 3 deletions oas_docs/output/kibana.serverless.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23558,7 +23558,7 @@ paths:
- Elastic Agent policies
/api/fleet/logstash_api_keys:
post:
description: Generate Logstash API keyy
description: Generate Logstash API key
operationId: '%2Fapi%2Ffleet%2Flogstash_api_keys#0'
parameters:
- description: The version of the API to use
Expand Down Expand Up @@ -33189,6 +33189,8 @@ paths:
additionalProperties: false
type: object
properties:
delete_unenrolled_agents:
type: boolean
fleet_server_hosts:
items:
type: string
Expand Down Expand Up @@ -33220,7 +33222,6 @@ paths:
version:
type: string
required:
- prerelease_integrations_enabled
- id
required:
- item
Expand Down Expand Up @@ -33282,6 +33283,8 @@ paths:
properties:
additional_yaml_config:
type: string
delete_unenrolled_agents:
type: boolean
fleet_server_hosts:
items:
format: uri
Expand Down Expand Up @@ -33310,6 +33313,8 @@ paths:
additionalProperties: false
type: object
properties:
delete_unenrolled_agents:
type: boolean
fleet_server_hosts:
items:
type: string
Expand Down Expand Up @@ -33341,7 +33346,6 @@ paths:
version:
type: string
required:
- prerelease_integrations_enabled
- id
required:
- item
Expand Down
10 changes: 7 additions & 3 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23558,7 +23558,7 @@ paths:
- Elastic Agent policies
/api/fleet/logstash_api_keys:
post:
description: Generate Logstash API keyy
description: Generate Logstash API key
operationId: '%2Fapi%2Ffleet%2Flogstash_api_keys#0'
parameters:
- description: The version of the API to use
Expand Down Expand Up @@ -33189,6 +33189,8 @@ paths:
additionalProperties: false
type: object
properties:
delete_unenrolled_agents:
type: boolean
fleet_server_hosts:
items:
type: string
Expand Down Expand Up @@ -33220,7 +33222,6 @@ paths:
version:
type: string
required:
- prerelease_integrations_enabled
- id
required:
- item
Expand Down Expand Up @@ -33282,6 +33283,8 @@ paths:
properties:
additional_yaml_config:
type: string
delete_unenrolled_agents:
type: boolean
fleet_server_hosts:
items:
format: uri
Expand Down Expand Up @@ -33310,6 +33313,8 @@ paths:
additionalProperties: false
type: object
properties:
delete_unenrolled_agents:
type: boolean
fleet_server_hosts:
items:
type: string
Expand Down Expand Up @@ -33341,7 +33346,6 @@ paths:
version:
type: string
required:
- prerelease_integrations_enabled
- id
required:
- item
Expand Down
10 changes: 7 additions & 3 deletions oas_docs/output/kibana.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26987,7 +26987,7 @@ paths:
- Elastic Agent policies
/api/fleet/logstash_api_keys:
post:
description: Generate Logstash API keyy
description: Generate Logstash API key
operationId: '%2Fapi%2Ffleet%2Flogstash_api_keys#0'
parameters:
- description: The version of the API to use
Expand Down Expand Up @@ -36618,6 +36618,8 @@ paths:
additionalProperties: false
type: object
properties:
delete_unenrolled_agents:
type: boolean
fleet_server_hosts:
items:
type: string
Expand Down Expand Up @@ -36649,7 +36651,6 @@ paths:
version:
type: string
required:
- prerelease_integrations_enabled
- id
required:
- item
Expand Down Expand Up @@ -36711,6 +36712,8 @@ paths:
properties:
additional_yaml_config:
type: string
delete_unenrolled_agents:
type: boolean
fleet_server_hosts:
items:
format: uri
Expand Down Expand Up @@ -36739,6 +36742,8 @@ paths:
additionalProperties: false
type: object
properties:
delete_unenrolled_agents:
type: boolean
fleet_server_hosts:
items:
type: string
Expand Down Expand Up @@ -36770,7 +36775,6 @@ paths:
version:
type: string
required:
- prerelease_integrations_enabled
- id
required:
- item
Expand Down
10 changes: 7 additions & 3 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26987,7 +26987,7 @@ paths:
- Elastic Agent policies
/api/fleet/logstash_api_keys:
post:
description: Generate Logstash API keyy
description: Generate Logstash API key
operationId: '%2Fapi%2Ffleet%2Flogstash_api_keys#0'
parameters:
- description: The version of the API to use
Expand Down Expand Up @@ -36618,6 +36618,8 @@ paths:
additionalProperties: false
type: object
properties:
delete_unenrolled_agents:
type: boolean
fleet_server_hosts:
items:
type: string
Expand Down Expand Up @@ -36649,7 +36651,6 @@ paths:
version:
type: string
required:
- prerelease_integrations_enabled
- id
required:
- item
Expand Down Expand Up @@ -36711,6 +36712,8 @@ paths:
properties:
additional_yaml_config:
type: string
delete_unenrolled_agents:
type: boolean
fleet_server_hosts:
items:
format: uri
Expand Down Expand Up @@ -36739,6 +36742,8 @@ paths:
additionalProperties: false
type: object
properties:
delete_unenrolled_agents:
type: boolean
fleet_server_hosts:
items:
type: string
Expand Down Expand Up @@ -36770,7 +36775,6 @@ paths:
version:
type: string
required:
- prerelease_integrations_enabled
- id
required:
- item
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 @@ -717,6 +715,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
Original file line number Diff line number Diff line change
Expand Up @@ -2369,6 +2369,10 @@
},
"ingest_manager_settings": {
"properties": {
"delete_unenrolled_agents": {
"index": false,
"type": "boolean"
},
"fleet_server_hosts": {
"type": "keyword"
},
Expand Down
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
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