mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[cli] Re-add --serverless support on distributions (#159516)
Prior to https://github.com/elastic/kibana/pull/158750, `bin/kibana --serverless=<project>` was able to load project specific configurations on Kibana distributions. This was used in functional tests [here](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/functional/config.base.ts#L31), but admittedly may not be the correct way to start the Kibana server. Opening this up for discussion 1) Do we want to support `bin/kibana --serverless`? 2) What's the recommended way to run a distribution in serverless mode? --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
7a3ce25d2b
commit
736252e5ef
1 changed files with 7 additions and 3 deletions
|
@ -205,17 +205,21 @@ export default function (program) {
|
|||
}
|
||||
|
||||
command.action(async function (opts) {
|
||||
const unknownOptions = this.getUnknownOptions();
|
||||
const configs = compileConfigStack({
|
||||
configOverrides: opts.config,
|
||||
devConfig: opts.devConfig,
|
||||
dev: opts.dev,
|
||||
serverless: opts.serverless,
|
||||
serverless: opts.serverless || unknownOptions.serverless,
|
||||
});
|
||||
|
||||
const configsEvaluted = getConfigFromFiles(configs);
|
||||
const isServerlessMode = !!(configsEvaluted.serverless || opts.serverless);
|
||||
const isServerlessMode = !!(
|
||||
configsEvaluted.serverless ||
|
||||
opts.serverless ||
|
||||
unknownOptions.serverless
|
||||
);
|
||||
|
||||
const unknownOptions = this.getUnknownOptions();
|
||||
const cliArgs = {
|
||||
dev: !!opts.dev,
|
||||
envName: unknownOptions.env ? unknownOptions.env.name : undefined,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue