Skip to content

Commit

Permalink
Remove unused elasticsearch.preserverHost setting (#78608) (#78921)
Browse files Browse the repository at this point in the history
* Remove unused elasticsearch.preserverHost setting

* deprecate and remove elasticsearch.startupTimeout config
# Conflicts:
#	src/core/server/config/deprecation/core_deprecations.ts
  • Loading branch information
rudolf authored Oct 1, 2020
1 parent 7ce4b6a commit e51a87a
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 30 deletions.
8 changes: 0 additions & 8 deletions config/kibana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
# The URLs of the Elasticsearch instances to use for all your queries.
#elasticsearch.hosts: ["http://localhost:9200"]

# When this setting's value is true Kibana uses the hostname specified in the server.host
# setting. When the value of this setting is false, Kibana uses the hostname of the host
# that connects to this Kibana instance.
#elasticsearch.preserveHost: true

# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
# dashboards. Kibana creates a new index if the index doesn't already exist.
#kibana.index: ".kibana"
Expand Down Expand Up @@ -84,9 +79,6 @@
# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
#elasticsearch.shardTimeout: 30000

# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.
#elasticsearch.startupTimeout: 5000

# Logs queries sent to Elasticsearch. Requires logging.verbose set to true.
#elasticsearch.logQueries: false

Expand Down
9 changes: 0 additions & 9 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ currently do not have an inspector, for example Timelion and Monitoring.
| Time in milliseconds to wait for {es} to respond to pings.
*Default: the value of the <<elasticsearch-requestTimeout, `elasticsearch.requestTimeout`>> setting*

| `elasticsearch.preserveHost:`
| When the value is `true`, {kib} uses the hostname specified in the
<<server-host, `server.host`>> setting. When the value is `false`, {kib} uses
the hostname of the host that connects to this {kib} instance. *Default: `true`*

|[[elasticsearch-requestHeadersWhitelist]] `elasticsearch.requestHeadersWhitelist:`
| List of {kib} client-side headers to send to {es}. To send *no* client-side
headers, set this value to [] (an empty list). Removing the `authorization`
Expand Down Expand Up @@ -204,10 +199,6 @@ making an outbound SSL/TLS connection to {es}. Valid values are `"full"`,
using `"certificate"` skips hostname verification, and using `"none"` skips
verification entirely. *Default: `"full"`*

| `elasticsearch.startupTimeout:`
| Time in milliseconds to wait for {es} at {kib} startup before retrying.
*Default: `5000`*

|[[elasticsearch-user-passwd]] `elasticsearch.username:` and `elasticsearch.password:`
| If your {es} is protected with basic authentication, these settings provide
the username and password that the {kib} server uses to perform maintenance
Expand Down
2 changes: 2 additions & 0 deletions src/core/server/config/deprecation/core_deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ export const coreDeprecationProvider: ConfigDeprecationProvider = ({
renameFromRoot('xpack.telemetry.url', 'telemetry.url'),
renameFromRoot('cpu.cgroup.path.override', 'ops.cGroupOverrides.cpuPath'),
renameFromRoot('cpuacct.cgroup.path.override', 'ops.cGroupOverrides.cpuAcctPath'),
unusedFromRoot('elasticsearch.preserveHost'),
unusedFromRoot('elasticsearch.startupTimeout'),
configPathDeprecation,
dataPathDeprecation,
rewriteBasePathDeprecation,
Expand Down
2 changes: 0 additions & 2 deletions src/core/server/elasticsearch/elasticsearch_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export const configSchema = schema.object({
hosts: schema.oneOf([hostURISchema, schema.arrayOf(hostURISchema, { minSize: 1 })], {
defaultValue: 'http://localhost:9200',
}),
preserveHost: schema.boolean({ defaultValue: true }),
username: schema.maybe(
schema.conditional(
schema.contextRef('dist'),
Expand All @@ -71,7 +70,6 @@ export const configSchema = schema.object({
shardTimeout: schema.duration({ defaultValue: '30s' }),
requestTimeout: schema.duration({ defaultValue: '30s' }),
pingTimeout: schema.duration({ defaultValue: schema.siblingRef('requestTimeout') }),
startupTimeout: schema.duration({ defaultValue: '5s' }),
logQueries: schema.boolean({ defaultValue: false }),
ssl: schema.object(
{
Expand Down
1 change: 0 additions & 1 deletion src/core/server/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export function pluginInitializerContextConfigMock<T>(config: T) {
shardTimeout: duration('30s'),
requestTimeout: duration('30s'),
pingTimeout: duration('30s'),
startupTimeout: duration('30s'),
},
path: { data: '/tmp' },
savedObjects: {
Expand Down
1 change: 0 additions & 1 deletion src/core/server/plugins/plugin_context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ describe('createPluginInitializerContext', () => {
shardTimeout: duration(30, 's'),
requestTimeout: duration(30, 's'),
pingTimeout: duration(30, 's'),
startupTimeout: duration(5, 's'),
},
path: { data: fromRoot('data') },
savedObjects: { maxImportPayloadBytes: new ByteSizeValue(10485760) },
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/plugins/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export interface Plugin<
export const SharedGlobalConfigKeys = {
// We can add more if really needed
kibana: ['index', 'autocompleteTerminateAfter', 'autocompleteTimeout'] as const,
elasticsearch: ['shardTimeout', 'requestTimeout', 'pingTimeout', 'startupTimeout'] as const,
elasticsearch: ['shardTimeout', 'requestTimeout', 'pingTimeout'] as const,
path: ['data'] as const,
savedObjects: ['maxImportPayloadBytes'] as const,
};
Expand Down
2 changes: 0 additions & 2 deletions src/core/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,13 @@ export const config: {
sniffInterval: Type<false | import("moment").Duration>;
sniffOnConnectionFault: Type<boolean>;
hosts: Type<string | string[]>;
preserveHost: Type<boolean>;
username: Type<string | undefined>;
password: Type<string | undefined>;
requestHeadersWhitelist: Type<string | string[]>;
customHeaders: Type<Record<string, string>>;
shardTimeout: Type<import("moment").Duration>;
requestTimeout: Type<import("moment").Duration>;
pingTimeout: Type<import("moment").Duration>;
startupTimeout: Type<import("moment").Duration>;
logQueries: Type<boolean>;
ssl: import("@kbn/config-schema").ObjectType<{
verificationMode: Type<"none" | "certificate" | "full">;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
#
# eg. Setting the environment variable:
#
# ELASTICSEARCH_STARTUPTIMEOUT=60
# ELASTICSEARCH_LOGQUERIES=true
#
# will cause Kibana to be invoked with:
#
# --elasticsearch.startupTimeout=60
# --elasticsearch.logQueries=true

kibana_vars=(
console.enabled
Expand All @@ -30,7 +30,6 @@ kibana_vars=(
elasticsearch.logQueries
elasticsearch.password
elasticsearch.pingTimeout
elasticsearch.preserveHost
elasticsearch.requestHeadersWhitelist
elasticsearch.requestTimeout
elasticsearch.shardTimeout
Expand All @@ -47,7 +46,6 @@ kibana_vars=(
elasticsearch.ssl.truststore.path
elasticsearch.ssl.truststore.password
elasticsearch.ssl.verificationMode
elasticsearch.startupTimeout
elasticsearch.username
i18n.locale
interpreter.enableInVisualize
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/monitoring/server/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ describe('config schema', () => {
"logFetchCount": 10,
"logQueries": false,
"pingTimeout": "PT30S",
"preserveHost": true,
"requestHeadersWhitelist": Array [
"authorization",
],
Expand All @@ -87,7 +86,6 @@ describe('config schema', () => {
"truststore": Object {},
"verificationMode": "full",
},
"startupTimeout": "PT5S",
},
"enabled": true,
"logs": Object {
Expand Down

0 comments on commit e51a87a

Please sign in to comment.