mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* deprecate CONFIG_PATH and DATA_PATH (#32049) * rm default config from environment variable * add deprecation logs * fix path * folder * redo docs * fix && * remove newline * rm newline * fix backport
This commit is contained in:
parent
1dcdb7370d
commit
97b6b0e50a
3 changed files with 19 additions and 4 deletions
|
@ -134,8 +134,7 @@ export default function (program) {
|
|||
.option('-e, --elasticsearch <uri1,uri2>', 'Elasticsearch instances')
|
||||
.option(
|
||||
'-c, --config <path>',
|
||||
'Path to the config file, can be changed with the CONFIG_PATH environment variable as well. ' +
|
||||
'Use multiple --config args to include multiple config files.',
|
||||
'Path to the config file, use multiple --config args to include multiple config files',
|
||||
configPathCollector,
|
||||
[ getConfig() ]
|
||||
)
|
||||
|
|
|
@ -55,6 +55,18 @@ const loggingTimezone = (settings, log) => {
|
|||
}
|
||||
};
|
||||
|
||||
const configPath = (settings, log) => {
|
||||
if (_.has(process, 'env.CONFIG_PATH')) {
|
||||
log(`Environment variable CONFIG_PATH is deprecated. It has been replaced with KIBANA_PATH_CONF pointing to a config folder`);
|
||||
}
|
||||
};
|
||||
|
||||
const dataPath = (settings, log) => {
|
||||
if (_.has(process, 'env.DATA_PATH')) {
|
||||
log(`Environment variable "DATA_PATH" will be removed. It has been replaced with kibana.yml setting "path.data"`);
|
||||
}
|
||||
};
|
||||
|
||||
const deprecations = [
|
||||
//server
|
||||
unused('server.xsrf.token'),
|
||||
|
@ -67,6 +79,8 @@ const deprecations = [
|
|||
savedObjectsIndexCheckTimeout,
|
||||
rewriteBasePath,
|
||||
loggingTimezone,
|
||||
configPath,
|
||||
dataPath
|
||||
];
|
||||
|
||||
export const transformDeprecations = createTransform(deprecations);
|
||||
|
|
|
@ -17,18 +17,20 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
import { join } from 'path';
|
||||
import { accessSync, R_OK } from 'fs';
|
||||
import { find } from 'lodash';
|
||||
import { fromRoot } from '../../utils';
|
||||
|
||||
const CONFIG_PATHS = [
|
||||
process.env.CONFIG_PATH,
|
||||
process.env.KIBANA_PATH_CONF && join(process.env.KIBANA_PATH_CONF, 'kibana.yml'),
|
||||
process.env.CONFIG_PATH, //deprecated
|
||||
fromRoot('config/kibana.yml'),
|
||||
'/etc/kibana/kibana.yml'
|
||||
].filter(Boolean);
|
||||
|
||||
const DATA_PATHS = [
|
||||
process.env.DATA_PATH,
|
||||
process.env.DATA_PATH, //deprecated
|
||||
fromRoot('data'),
|
||||
'/var/lib/kibana'
|
||||
].filter(Boolean);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue