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 for Elasticsearch ILM Polices #2454

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
bfb2e87
#2048 - Adds support for Elasticsearch ILM Polices
bhiravabhatla Sep 3, 2020
6acf5da
#2048 - Fixes index templates to work well with Index prefixes
bhiravabhatla Sep 4, 2020
17a8e1c
#2048 - Modify existing index templates to use ILM - avoid creating n…
bhiravabhatla Sep 26, 2020
06896ec
Merge branch 'master' into master
bhiravabhatla Sep 26, 2020
5f0dac7
#2048 - Fix perform_action method call by passing missing argument
bhiravabhatla Sep 26, 2020
f24f9fa
Merge branch 'master' into master
bhiravabhatla Oct 22, 2020
09ba770
Merge branch 'master' into master
bhiravabhatla Nov 27, 2020
fe5938f
#2048[WIP] - Add support for enabling ILM using command line param
bhiravabhatla Dec 4, 2020
f02553e
#2048[WIP] - Rebasing with upstream master
bhiravabhatla Dec 4, 2020
1af12df
#2048[WIP] - Fix lint issues
bhiravabhatla Dec 5, 2020
0f5bb18
#2048[WIP] - Fix integration tests and remobe ES_USE_ILM parameter fr…
bhiravabhatla Dec 5, 2020
8d3c483
#2048[WIP] - Fix failing es-otel-exporter-integration-test
bhiravabhatla Dec 5, 2020
e5fda11
#2048[WIP] - Implement suggested feedback and add integration test fo…
bhiravabhatla Dec 12, 2020
016f626
Merge branch 'master' of https://github.com/jaegertracing/jaeger
bhiravabhatla Dec 12, 2020
f524da3
#2048[WIP] - Fix lint issues
bhiravabhatla Dec 12, 2020
0076eaf
#2048[WIP] - Add write_index setting only if use_ilm is enabled & fix…
bhiravabhatla Dec 13, 2020
653b861
#2048[WIP] - Fix failing exporter integration tests
bhiravabhatla Dec 13, 2020
526f214
Update plugin/storage/es/options.go
bhiravabhatla Dec 14, 2020
8a51584
2048[WIP] - Implement @albertteoh feedback on error variable names an…
bhiravabhatla Dec 19, 2020
fcbf676
Fix fmt issue
bhiravabhatla Dec 19, 2020
a3e8f0e
Fix misleading use-alias help doc (#2692)
albertteoh Dec 15, 2020
8e0b750
#2048[WIP] - Fix failing build and implement feedback on escaping quotes
bhiravabhatla Dec 19, 2020
e2a0fee
#2048[WIP] - Add integration test to check index template names with …
bhiravabhatla Dec 19, 2020
3f31372
#2048[WIP] - Add check to fail if delete ILM policy fails
bhiravabhatla Dec 19, 2020
aacf4c9
#2048[WIP] - Move Index rollover tests to another file
bhiravabhatla Dec 19, 2020
77a8a17
#2048[WIP] - Skip TestIndexRollover_FailIfILMNotPresent test for es v…
bhiravabhatla Dec 19, 2020
4755013
#2048[WIP] - Clean ES before running rollover test for ES version < 7
bhiravabhatla Dec 19, 2020
667a511
Update plugin/storage/es/options.go
bhiravabhatla Dec 14, 2020
3696256
#2048[WIP] - Replace external dependency for rendering templates with…
bhiravabhatla Jan 16, 2021
4b044bc
Fix potential cross-site scripting issues (#2697)
yurishkuro Dec 20, 2020
877175c
Remove 'Report Security Issue' link since GitHub already adds it prom…
yurishkuro Dec 21, 2020
f57c970
Add gh action for hotrod ci jobs (#2702)
Ashmita152 Dec 24, 2020
c514c91
Clean-up "tcollector" references (#2704)
sniperking1234 Dec 25, 2020
183af3c
Fix flaky TestHotReloadUIConfigTempFile (#2713)
albertteoh Jan 7, 2021
d1e9dc4
[pkg/queue] Add `StartConsumersWithFactory` function (#2714)
mx-psi Jan 7, 2021
4c8ad45
[mem store] Return clones of spans to prevent in-place changes by adj…
bobrik Jan 9, 2021
602b943
Show plaintext as supported Kafka auth option in CLI help (#2721)
pdepaepe Jan 11, 2021
00b7daa
[agent] Add metrics to show connections status between agent and coll…
WalkerWang731 Jan 13, 2021
b980e87
[refactor] Minor clean-up of #2657 (#2728)
yurishkuro Jan 13, 2021
5b80343
[tests] Increase timeout for TestGRPCResolverRoundRobin (#2729)
yurishkuro Jan 14, 2021
dc1b855
Add ability to use JS file for UI configuration (jaeger-ui/#123) (#2707)
th3M1ke Jan 14, 2021
76256d6
Add support for Kafka SASL/PLAIN authentication via SCRAM-SHA-256 or …
WalkerWang731 Jan 14, 2021
1a888aa
#2048[WIP] - Fix fmt issues
bhiravabhatla Jan 16, 2021
9bec1a4
#2048[WIP] - Implement feedback on CLI - use cobra & unit tests
bhiravabhatla Jan 22, 2021
01654f9
Increase HotROD CI test timeout to 30sec
yurishkuro Jan 18, 2021
ea4e71c
Update jaeger-ui to use memoization for getConfig (#2732)
th3M1ke Jan 18, 2021
23f53dd
Fix broken CNCF logo link
yurishkuro Jan 18, 2021
ef16c6a
TLS support for HTTP API of Query server (#2337)
rjs211 Jan 19, 2021
0f0cc90
Add ability to remove inactive maintainers; introduce Emeritus status…
yurishkuro Jan 19, 2021
d4895d7
Transition black-adder and tiffon to Emeritus Maintainers (#2735)
yurishkuro Jan 20, 2021
6864653
Enable stale bot for PRs and questions (#2731)
yurishkuro Jan 20, 2021
6f8bfb1
Expose cache ttl for es span writer index+service (#2737)
necrolyte2 Jan 21, 2021
d85d954
#2048[WIP] - Fix failing integration tests and lint
bhiravabhatla Jan 22, 2021
c0f3e93
#2048[WIP] - Fix fmt issues
bhiravabhatla Jan 22, 2021
09e4e9d
#2048[WIP] - add tests to increase coverage
bhiravabhatla Jan 22, 2021
a3b465b
Fix merge conflicts
bhiravabhatla Jan 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions plugin/storage/es/esRollover.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import requests
import ssl
import sys
import re
from pathlib2 import Path
from requests.auth import HTTPBasicAuth

Expand Down Expand Up @@ -57,17 +58,17 @@ def main():
if str2bool(os.getenv('ARCHIVE', 'false')):
write_alias = prefix + ARCHIVE_INDEX + '-write'
read_alias = prefix + ARCHIVE_INDEX + '-read'
perform_action(action, client, write_alias, read_alias, prefix+'jaeger-span-archive', 'jaeger-span')
perform_action(action, client, write_alias, read_alias, prefix+'jaeger-span-archive', 'jaeger-span', prefix)
else:
write_alias = prefix + 'jaeger-span-write'
read_alias = prefix + 'jaeger-span-read'
perform_action(action, client, write_alias, read_alias, prefix+'jaeger-span', 'jaeger-span')
perform_action(action, client, write_alias, read_alias, prefix+'jaeger-span', 'jaeger-span', prefix)
write_alias = prefix + 'jaeger-service-write'
read_alias = prefix + 'jaeger-service-read'
perform_action(action, client, write_alias, read_alias, prefix+'jaeger-service', 'jaeger-service')
perform_action(action, client, write_alias, read_alias, prefix+'jaeger-service', 'jaeger-service', prefix)


def perform_action(action, client, write_alias, read_alias, index_to_rollover, template_name):
def perform_action(action, client, write_alias, read_alias, index_to_rollover, template_name, prefix):
if action == 'init':
shards = os.getenv('SHARDS', SHARDS)
replicas = os.getenv('REPLICAS', REPLICAS)
Expand All @@ -76,7 +77,7 @@ def perform_action(action, client, write_alias, read_alias, index_to_rollover, t
mapping = Path('./mappings/'+template_name+'-7.json').read_text()
else:
mapping = Path('./mappings/'+template_name+'.json').read_text()
create_index_template(fix_mapping(mapping, shards, replicas), template_name)
create_index_template(fix_mapping(mapping, shards, replicas, prefix), prefix+template_name+"-with-ilm")

index = index_to_rollover + '-000001'
create_index(client, index)
Expand Down Expand Up @@ -118,9 +119,12 @@ def create_aliases(client, alias_name, archive_index_name):
"""
ilo = curator.IndexList(client)
ilo.filter_by_regex(kind='regex', value='^'+archive_index_name+'$')
alias = curator.Alias(client=client, name=alias_name)
for index in ilo.working_list():
print("Adding index {} to alias {}".format(index, alias_name))
if re.search(r'write', alias_name):
bhiravabhatla marked this conversation as resolved.
Show resolved Hide resolved
alias = curator.Alias(client=client, name=alias_name, extra_settings={'is_write_index': True})
else:
alias = curator.Alias(client=client, name=alias_name)
alias.add(ilo)
alias.do_action()

Expand Down Expand Up @@ -174,9 +178,10 @@ def str2bool(v):
return v.lower() in ('true', '1')


def fix_mapping(mapping, shards, replicas):
def fix_mapping(mapping, shards, replicas, prefix):
mapping = mapping.replace("${__NUMBER_OF_SHARDS__}", str(shards))
mapping = mapping.replace("${__NUMBER_OF_REPLICAS__}", str(replicas))
mapping = mapping.replace("${__PREFIX__}", str(prefix))
return mapping


Expand Down
12 changes: 10 additions & 2 deletions plugin/storage/es/mappings/jaeger-service-7.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
{
"index_patterns": "*jaeger-service-*",
"index_patterns": "${__PREFIX__}jaeger-service-*",
"order": 1,
"aliases": {
"${__PREFIX__}jaeger-service-read" : {}
},
"settings":{
"index.number_of_shards": ${__NUMBER_OF_SHARDS__},
"index.number_of_replicas": ${__NUMBER_OF_REPLICAS__},
"index.mapping.nested_fields.limit":50,
"index.requests.cache.enable":true
"index.requests.cache.enable":true,
"lifecycle": {
"name": "jaeger",
"rollover_alias": "${__PREFIX__}jaeger-service-write"
}
},
"mappings":{
"dynamic_templates":[
Expand Down
12 changes: 10 additions & 2 deletions plugin/storage/es/mappings/jaeger-span-7.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
{
"index_patterns": "*jaeger-span-*",
"index_patterns": "${__PREFIX__}jaeger-span-*",
"order": 1,
"aliases": {
"${__PREFIX__}jaeger-span-read": {}
},
"settings":{
"index.number_of_shards": ${__NUMBER_OF_SHARDS__},
"index.number_of_replicas": ${__NUMBER_OF_REPLICAS__},
"index.mapping.nested_fields.limit":50,
"index.requests.cache.enable":true
"index.requests.cache.enable":true,
"lifecycle": {
"name": "jaeger",
bhiravabhatla marked this conversation as resolved.
Show resolved Hide resolved
"rollover_alias": "${__PREFIX__}jaeger-span-write"
}
},
"mappings":{
"dynamic_templates":[
Expand Down