Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to Serverless Elasticsearch #1145

Merged
merged 10 commits into from Aug 9, 2023

Conversation

kaisecheng
Copy link
Contributor

@kaisecheng kaisecheng commented Aug 3, 2023

The pool stores build flavour in health check to determinate if the Elasticsearch is serverless.
In serverless, ilm, legacy template API and license checker are disabled. The plugin throws ConfigurationError when ilm_enabled => true or template_api => legacy

todo: add integration test against serverless

fixes: https://github.com/elastic/ingest-dev/issues/2277

The pool stores build flavour in health check to determinate if the
Elasticsearch is serverless.
In serverless, ilm, legacy template API, license checker are disabled
and the plugin throws ConfigurationError when ilm_enabled => true or
template_api => legacy
@kaisecheng kaisecheng changed the title Added support to Serverless Elasticsearch Add support to Serverless Elasticsearch Aug 3, 2023
@roaksoax roaksoax requested a review from jsvd August 4, 2023 14:00
@jsvd jsvd self-requested a review August 8, 2023 15:36
Copy link
Contributor

@jsvd jsvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, just some minor naming nitpicks

plugin.logger.trace("Resolving ILM template settings: template doesn't have 'settings' or 'template' fields, falling back to auto detection", :template => template, :template_api => plugin.template_api, :es_version => plugin.maximum_seen_major_version, :template_endpoint => template_endpoint)
template_endpoint == INDEX_TEMPLATE_ENDPOINT ?
composable_index_template_settings(template) :
use_index_template = index_template?(plugin)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're not really using templates here, but figuring out which API for templating to use, maybe a better name:

Suggested change
use_index_template = index_template?(plugin)
use_index_template_api = index_template_api?(plugin)

spec/unit/outputs/elasticsearch/http_client/pool_spec.rb Outdated Show resolved Hide resolved
kaisecheng and others added 2 commits August 9, 2023 19:03
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
@kaisecheng kaisecheng merged commit ad1a8d5 into logstash-plugins:main Aug 9, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants