config: remove legacy pre-4.2 configurations (#12013)

Prior to version 4.2.0, kibana.yml configurations used underscore as a
separator. In 4.2.0, this changed to dot instead, though the old
configuration names continued to work. In 5.0 we started logging
deprecation notices whenever the underscore-separated configurations
were encountered. Now we remove support for them entirely.
This commit is contained in:
Court Ewing 2017-05-29 09:53:32 -04:00 committed by GitHub
parent 2876f1fdf6
commit 0384110089
3 changed files with 16 additions and 36 deletions

View file

@ -45,3 +45,10 @@ This is no longer the case. Now, only commas are a valid query separator: e.g. `
*Details:* Setting the NODE_ENV environment variable can break Kibana processes in unexpected ways, which is especially unfortunate since it is a common environment variable to have configured on a system, and you wouldn't expect it to break anything in Kibana. Kibana will now effectively ignore NODE_ENV entirely.
*Impact:* If you're developing a custom plugin that depends on NODE_ENV, you will need to update it to use a different, custom environment variable.
[float]
=== Kibana 4.x configuration names using `_` instead of `.` have been removed
*Details:* In Kibana 4.2, we renamed all configuration names in kibana.yml to use `.` as a separator instead of `_`, though the legacy configurations would still continue to work. In 5.0, we started logging deprecation notices whenever the legacy configurations were encountered. In 6.0 onward, legacy configuration names that use an underscore instead of a dot will no longer work.
*Impact:* Any usages of underscore separated configuration names in kibana.yml need to be updated to their modern equivalents. See <<settings,Configuring Kibana>> for accepted configurations.

View file

@ -73,10 +73,14 @@ describe('server config complete', function () {
expect(server.log.called).to.be(false);
});
it('should transform deprecated settings ', function () {
it('should transform server.ssl.cert to server.ssl.certificate', function () {
const kbnServer = {
settings: {
port: 8080
server: {
ssl: {
cert: 'path/to/cert'
}
}
}
};
@ -88,7 +92,9 @@ describe('server config complete', function () {
const config = {
get: sinon.stub().returns({
server: {
port: 8080
ssl: {
certificate: 'path/to/cert'
}
}
})
};

View file

@ -15,42 +15,9 @@ const serverSslEnabled = (settings, log) => {
const deprecations = [
//server
rename('port' ,'server.port'),
rename('host', 'server.host'),
rename('pid_file', 'pid.file'),
rename('ssl_cert_file', 'server.ssl.certificate'),
rename('server.ssl.cert', 'server.ssl.certificate'),
rename('ssl_key_file', 'server.ssl.key'),
unused('server.xsrf.token'),
serverSslEnabled,
// logging
rename('log_file', 'logging.dest'),
// kibana
rename('kibana_index', 'kibana.index'),
rename('default_app_id', 'kibana.defaultAppId'),
// es
rename('ca', 'elasticsearch.ssl.ca'),
rename('elasticsearch_preserve_host', 'elasticsearch.preserveHost'),
rename('elasticsearch_url', 'elasticsearch.url'),
rename('kibana_elasticsearch_client_crt', 'elasticsearch.ssl.cert'),
rename('kibana_elasticsearch_client_key', 'elasticsearch.ssl.key'),
rename('kibana_elasticsearch_password', 'elasticsearch.password'),
rename('kibana_elasticsearch_username', 'elasticsearch.username'),
rename('ping_timeout', 'elasticsearch.pingTimeout'),
rename('request_timeout', 'elasticsearch.requestTimeout'),
rename('shard_timeout', 'elasticsearch.shardTimeout'),
rename('startup_timeout', 'elasticsearch.startupTimeout'),
rename('verify_ssl', 'elasticsearch.ssl.verify'),
// tilemap
rename('tilemap_url', 'tilemap.url'),
rename('tilemap_min_zoom', 'tilemap.options.minZoom'),
rename('tilemap_max_zoom', 'tilemap.options.maxZoom'),
rename('tilemap_attribution', 'tilemap.options.attribution'),
rename('tilemap_subdomains', 'tilemap.options.subdomains')
];
export const transformDeprecations = createTransform(deprecations);