Skip to content

Commit

Permalink
feat(datahub-upgrade): allow specifying index settings as a map (acry…
Browse files Browse the repository at this point in the history
  • Loading branch information
darnaut authored May 21, 2024
1 parent 37dd1f5 commit 926b8a7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/datahub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Helm chart for LinkedIn DataHub
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.4.11
version: 0.4.12
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 0.13.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,23 @@ spec:
value: {{ . | quote }}
{{- end }}
{{- with .Values.global.elasticsearch.index.settingsOverrides }}
{{- if typeIs "map[string]interface {}" . }}
- name: ELASTICSEARCH_INDEX_BUILDER_SETTINGS_OVERRIDES
value: {{ toJson . | quote }}
{{- else }}
- name: ELASTICSEARCH_INDEX_BUILDER_SETTINGS_OVERRIDES
value: {{ . | quote }}
{{- end }}
{{- end }}
{{- with .Values.global.elasticsearch.index.entitySettingsOverrides }}
{{- if typeIs "map[string]interface {}" . }}
- name: ELASTICSEARCH_INDEX_BUILDER_ENTITY_SETTINGS_OVERRIDES
value: {{ toJson . | quote }}
{{- else }}
- name: ELASTICSEARCH_INDEX_BUILDER_ENTITY_SETTINGS_OVERRIDES
value: {{ . | quote }}
{{- end }}
{{- end }}
{{- with .Values.global.elasticsearch.index.refreshIntervalSeconds }}
- name: ELASTICSEARCH_INDEX_BUILDER_REFRESH_INTERVAL_SECONDS
value: {{ . | quote }}
Expand Down Expand Up @@ -261,13 +271,23 @@ spec:
value: {{ . | quote }}
{{- end }}
{{- with .Values.global.elasticsearch.index.settingsOverrides }}
{{- if typeIs "map[string]interface {}" . }}
- name: ELASTICSEARCH_INDEX_BUILDER_SETTINGS_OVERRIDES
value: {{ toJson . | quote }}
{{- else }}
- name: ELASTICSEARCH_INDEX_BUILDER_SETTINGS_OVERRIDES
value: {{ . | quote }}
{{- end }}
{{- end }}
{{- with .Values.global.elasticsearch.index.entitySettingsOverrides }}
{{- if typeIs "map[string]interface {}" . }}
- name: ELASTICSEARCH_INDEX_BUILDER_ENTITY_SETTINGS_OVERRIDES
value: {{ toJson . | quote }}
{{- else }}
- name: ELASTICSEARCH_INDEX_BUILDER_ENTITY_SETTINGS_OVERRIDES
value: {{ . | quote }}
{{- end }}
{{- end }}
{{- with .Values.global.elasticsearch.index.refreshIntervalSeconds }}
- name: ELASTICSEARCH_INDEX_BUILDER_REFRESH_INTERVAL_SECONDS
value: {{ . | quote }}
Expand Down
10 changes: 10 additions & 0 deletions charts/datahub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,18 @@ global:

## Index settings can be overridden for entity indices or other indices on an index by index basis
## Some index settings, such as # of shards, requires reindexing while others, i.e. replicas, do not
## The index settings options can be specified as a string or a map (which is converted to a string
## representation)
##
## Non-Entity indices do not require the prefix
# settingsOverrides: '{"graph_service_v1":{"number_of_shards":"5"},"system_metadata_service_v1":{"number_of_shards":"5"}}'
## or
# settingsOverrides:
# graph_service_v1:
# number_of_shards: '5'
# system_metadata_service_v1:
# number_of_shards: '6'
#
## Entity indices do not require the prefix or suffix
# entitySettingsOverrides: '{"dataset":{"number_of_shards":"10"}}'

Expand Down

0 comments on commit 926b8a7

Please sign in to comment.