Skip to content

Commit

Permalink
fix: update helm chart with ilm rollover alias property
Browse files Browse the repository at this point in the history
  • Loading branch information
Okhelifi committed Nov 15, 2024
1 parent e3ab5bd commit 284eb2c
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 2 deletions.
7 changes: 6 additions & 1 deletion helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ annotations:
###########
# "changes" must be the last section in this file, because a CI job clean it after each release
###########
artifacthub.io/changes:
artifacthub.io/changes: |
- kind: fixed
description: 'all users to overwrite the Elasticsearch or Opensearch rollover alias property name'
links:
- name: Github Issue
url: https://github.com/gravitee-io/issues/issues/10100
1 change: 1 addition & 0 deletions helm/templates/gateway/gateway-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ data:
{{- if (eq .Values.es.lifecycle.enabled true) }}
lifecycle:
policy_property_name: {{ .Values.es.lifecycle.policyPropertyName }}
rollover_alias_property_name: {{ .Values.es.lifecycle.rolloverAliasPropertyName }}
policies:
monitor: {{ .Values.es.lifecycle.policies.monitor }}
request: {{ .Values.es.lifecycle.policies.request }}
Expand Down
48 changes: 48 additions & 0 deletions helm/tests/gateway/configmap_es_reporter_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,51 @@ tests:
bulk:
actions: 1000 # Number of requests action before flush
flush_interval: 5 # Flush interval in seconds
- it: Check override es lifecycle settings
template: gateway/gateway-configmap.yaml
set:
es:
index_mode: ilm
lifecycle:
enabled: true
policy_property_name: index.plugins.index_state_management.policy_id
rollover_alias_property_name: index.plugins.index_state_management.rollover_alias
policies:
monitor: monitor
request: request
health: health
log: log
asserts:
- hasDocuments:
count: 1
- matchRegex:
path: data["gravitee.yml"]
pattern: |
reporters:
# Elasticsearch reporter
elasticsearch:
enabled: true
endpoints:
- http://graviteeio-apim-elasticsearch-ingest-hl:9200
index_mode: ilm
pipeline:
plugins:
ingest: geoip, user_agent
lifecycle:
policy_property_name: index.lifecycle.name
rollover_alias_property_name: index.lifecycle.rollover_alias
policies:
monitor: monitor
request: request
health: health
log: log
index: gravitee
settings:
number_of_replicas: 1
number_of_shards: 1
refresh_interval: 5s
bulk:
actions: 1000 # Number of requests action before flush
flush_interval: 5 # Flush interval in seconds
3 changes: 2 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ es:
password: example
lifecycle:
enabled: false
policyPropertyName: index.lifecycle.name #for openDistro, use 'opendistro.index_state_management.policy_id' instead of 'index.lifecycle.name'
policyPropertyName: index.lifecycle.name #for Opensearch, use 'index.plugins.index_state_management.policy_id' instead of 'index.lifecycle.name'
rolloverAliasPropertyName: index.lifecycle.rollover_alias #for Opensearch, use 'index.plugins.index_state_management.rollover_alias' instead of 'index.lifecycle.name'
policies:
monitor: my_policy ## ILM policy for the gravitee-monitor-* indexes
request: my_policy ## ILM policy for the gravitee-request-* indexes
Expand Down

0 comments on commit 284eb2c

Please sign in to comment.