mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Cloud Posture] feat: enable auto update (#144664)
This commit is contained in:
parent
b980c8cc4a
commit
c78b7fad9b
4 changed files with 21 additions and 3 deletions
|
@ -80,7 +80,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
|
|||
"endpoint:user-artifact": "f94c250a52b30d0a2d32635f8b4c5bdabd1e25c0",
|
||||
"endpoint:user-artifact-manifest": "8c14d49a385d5d1307d956aa743ec78de0b2be88",
|
||||
"enterprise_search_telemetry": "fafcc8318528d34f721c42d1270787c52565bad5",
|
||||
"epm-packages": "c4c39f20d6bcfff40994813ee0f2bab01d34b646",
|
||||
"epm-packages": "cb22b422398a785e7e0565a19c6d4d5c7af6f2fd",
|
||||
"epm-packages-assets": "9fd3d6726ac77369249e9a973902c2cd615fc771",
|
||||
"event_loop_delays_daily": "d2ed39cf669577d90921c176499908b4943fb7bd",
|
||||
"exception-list": "fe8cc004fd2742177cdb9300f4a67689463faf9c",
|
||||
|
|
|
@ -41,6 +41,7 @@ export const autoUpdatePackages = [
|
|||
FLEET_ENDPOINT_PACKAGE,
|
||||
FLEET_APM_PACKAGE,
|
||||
FLEET_SYNTHETICS_PACKAGE,
|
||||
FLEET_CLOUD_SECURITY_POSTURE_PACKAGE,
|
||||
];
|
||||
|
||||
export const HIDDEN_API_REFERENCE_PACKAGES = [
|
||||
|
@ -49,7 +50,11 @@ export const HIDDEN_API_REFERENCE_PACKAGES = [
|
|||
FLEET_SYNTHETICS_PACKAGE,
|
||||
];
|
||||
|
||||
export const autoUpgradePoliciesPackages = [FLEET_APM_PACKAGE, FLEET_SYNTHETICS_PACKAGE];
|
||||
export const autoUpgradePoliciesPackages = [
|
||||
FLEET_APM_PACKAGE,
|
||||
FLEET_SYNTHETICS_PACKAGE,
|
||||
FLEET_CLOUD_SECURITY_POSTURE_PACKAGE,
|
||||
];
|
||||
|
||||
export const agentAssetTypes = {
|
||||
Input: 'input',
|
||||
|
|
|
@ -47,7 +47,7 @@ import {
|
|||
migratePackagePolicyToV840,
|
||||
} from './migrations/to_v8_4_0';
|
||||
import { migratePackagePolicyToV850, migrateAgentPolicyToV850 } from './migrations/to_v8_5_0';
|
||||
import { migrateSettingsToV860 } from './migrations/to_v8_6_0';
|
||||
import { migrateSettingsToV860, migrateInstallationToV860 } from './migrations/to_v8_6_0';
|
||||
|
||||
/*
|
||||
* Saved object types and mappings
|
||||
|
@ -297,6 +297,7 @@ const getSavedObjectTypes = (
|
|||
'8.0.0': migrateInstallationToV800,
|
||||
'8.3.0': migrateInstallationToV830,
|
||||
'8.4.0': migrateInstallationToV840,
|
||||
'8.6.0': migrateInstallationToV860,
|
||||
},
|
||||
},
|
||||
[ASSETS_SAVED_OBJECT_TYPE]: {
|
||||
|
|
|
@ -9,6 +9,9 @@ import type { SavedObjectMigrationFn } from '@kbn/core/server';
|
|||
|
||||
import type { Settings } from '../../../common/types';
|
||||
|
||||
import type { Installation } from '../../../common';
|
||||
import { FLEET_CLOUD_SECURITY_POSTURE_PACKAGE } from '../../../common/constants';
|
||||
|
||||
export const migrateSettingsToV860: SavedObjectMigrationFn<Settings, Settings> = (
|
||||
settingsDoc,
|
||||
migrationContext
|
||||
|
@ -20,3 +23,12 @@ export const migrateSettingsToV860: SavedObjectMigrationFn<Settings, Settings> =
|
|||
|
||||
return settingsDoc;
|
||||
};
|
||||
|
||||
export const migrateInstallationToV860: SavedObjectMigrationFn<Installation, Installation> = (
|
||||
installationDoc
|
||||
) => {
|
||||
if (installationDoc.attributes.name === FLEET_CLOUD_SECURITY_POSTURE_PACKAGE) {
|
||||
installationDoc.attributes.keep_policies_up_to_date = true;
|
||||
}
|
||||
return installationDoc;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue