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

Allow the ILM policy name to be configurable #2971

Merged
merged 3 commits into from
May 4, 2021

Conversation

jrRibeiro
Copy link
Contributor

Which problem is this PR solving?

Short description of the changes

  • Add an option --ilm-policy-name to esmapping-generator, to set the policy name in the mappings file;
  • Set the mapping's option in the rollover script (using an env var - ES_ILM_POLICY_NAME).
  • The policy name defaults to jaeger-ilm-policy (both in the mapping generator and in the init action of the rollover script), so no breaking changes are added.

- Add an option --ilm-policy-name to esmapping-generator;
- Set the mapping's option in the rollover script (using an env var
  ES_ILM_POLICY_NAME).

The policy's name defaults to jaeger-ilm-policy (both in the mapping
generator and in the rollover script), so no breaking changes are added.

Signed-off-by: Ricardo Ribeiro <j.ribeiro.fafe@gmail.com>
@jrRibeiro jrRibeiro requested a review from a team as a code owner April 30, 2021 11:51
@jrRibeiro jrRibeiro requested a review from vprithvi April 30, 2021 11:51
yurishkuro
yurishkuro previously approved these changes Apr 30, 2021
@yurishkuro
Copy link
Member

@jrRibeiro I am not sure our CI covers this part of ES maintenance, did you do some manual testing? If so could you post some test results / evidence?

@codecov
Copy link

codecov bot commented Apr 30, 2021

Codecov Report

Merging #2971 (534dee9) into master (e13f0fe) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2971      +/-   ##
==========================================
- Coverage   95.97%   95.95%   -0.02%     
==========================================
  Files         223      223              
  Lines        9712     9718       +6     
==========================================
+ Hits         9321     9325       +4     
- Misses        324      326       +2     
  Partials       67       67              
Impacted Files Coverage Δ
plugin/storage/es/mappings/mapping.go 100.00% <ø> (ø)
cmd/esmapping-generator/app/flags.go 100.00% <100.00%> (ø)
cmd/esmapping-generator/app/renderer/render.go 100.00% <100.00%> (ø)
...lugin/sampling/strategystore/adaptive/processor.go 99.07% <0.00%> (-0.93%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e13f0fe...534dee9. Read the comment docs.

Signed-off-by: Ricardo Ribeiro <j.ribeiro.fafe@gmail.com>
@mergify mergify bot dismissed yurishkuro’s stale review May 3, 2021 19:36

Pull request has been modified.

@jrRibeiro
Copy link
Contributor Author

@jrRibeiro I am not sure our CI covers this part of ES maintenance, did you do some manual testing? If so could you post some test results / evidence?

Yes I did some manual testing but it's better to actually test the change as part of the integration tests of the index rollover.

I just added a new integration test (and refactored the tests a bit) to test both the default ILM policy name (to make sure that not setting the env var still works) and also a new test to set the env var and test if the ILM policy associated with the created indices matches the one we define.

yurishkuro
yurishkuro previously approved these changes May 3, 2021
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

LGTM

@albertteoh can you take a look at the integration test changes?

albertteoh
albertteoh previously approved these changes May 4, 2021
Copy link
Contributor

@albertteoh albertteoh left a comment

Choose a reason for hiding this comment

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

LGTM too.

@mergify mergify bot dismissed stale reviews from yurishkuro and albertteoh May 4, 2021 06:02

Pull request has been modified.

@albertteoh albertteoh merged commit 12bba8c into jaegertracing:master May 4, 2021
@albertteoh
Copy link
Contributor

Thanks @jrRibeiro!

@jrRibeiro
Copy link
Contributor Author

Thanks @jrRibeiro!

Thank you @yurishkuro and @albertteoh!

@jpkrohling jpkrohling added this to the Release 1.23.0 milestone Jun 4, 2021
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.

ILM policy is not configurable
4 participants