From edc5cf7e9b62e6603f4b04e8eccab8b00e8fdfea Mon Sep 17 00:00:00 2001 From: Zacqary Xeper Date: Wed, 24 Mar 2021 11:27:54 -0500 Subject: [PATCH] Disable reading preconfig from kibana.yml in plugin setup --- x-pack/plugins/fleet/server/services/setup.ts | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/x-pack/plugins/fleet/server/services/setup.ts b/x-pack/plugins/fleet/server/services/setup.ts index b74db703e893d..404fc86f9cc86 100644 --- a/x-pack/plugins/fleet/server/services/setup.ts +++ b/x-pack/plugins/fleet/server/services/setup.ts @@ -15,7 +15,6 @@ import type { PackagePolicy } from '../../common'; import { SO_SEARCH_LIMIT } from '../constants'; -import { appContextService } from './app_context'; import { agentPolicyService } from './agent_policy'; import { outputService } from './output'; import { @@ -30,10 +29,7 @@ import { awaitIfPending } from './setup_utils'; import { createDefaultSettings } from './settings'; import { ensureAgentActionPolicyChangeExists } from './agents'; import { awaitIfFleetServerSetupPending } from './fleet_server'; -import { - ensurePreconfiguredPackagesAndPolicies, - addPackageToAgentPolicy, -} from './policy_preconfig'; +import { addPackageToAgentPolicy } from './policy_preconfig'; const FLEET_ENROLL_USERNAME = 'fleet_enroll'; const FLEET_ENROLL_ROLE = 'fleet_enroll'; @@ -156,20 +152,6 @@ async function createSetupSideEffects( await ensureAgentActionPolicyChangeExists(soClient); - const { agentPolicies: policiesOrUndefined, packages: packagesOrUndefined } = - appContextService.getConfig() ?? {}; - - const policies = policiesOrUndefined ?? []; - const packages = packagesOrUndefined ?? []; - - await ensurePreconfiguredPackagesAndPolicies( - soClient, - esClient, - policies, - packages, - defaultOutput - ); - return { isIntialized: true }; }