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

feat: support elasticsearch module #41

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 8 additions & 1 deletion brownie/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@ KAFKA_PASSWORD=admin

POSTGRESQL_CONFIG_NAMES="server1 server2"

#Elasticsearch
ELASTICSEARCH_BROKER_PROTOCOL=http
ELASTICSEARCH_BROKERS=$LOCAL_HOST_IP
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_USERNAME=admin
ELASTICSEARCH_PASSWORD=admin

ENABLED_MODULES="postgresql=server1;server2,kafka"
BROWNIE_NODE_OPTIONS=--max-heap-size=256
# Pattern with group wich extracts timestamp made of 14 digits: yyyyMMddHHmmss prefixed with "ts"
TIMESTAMP_PATTRN="^.*pit.*_(ts\d{14,14}).*"
TIMESTAMP_PATTERN="^.*pit.*_(ts\d{14,14}).*"
# The format is: <digit><unit>, where unit is "days" or "hours" or "minutes"
RETENTION_PERIOD=5days
22 changes: 22 additions & 0 deletions brownie/deployment/helm/templates/dev-secretstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,26 @@ spec:
}
{{- end }}
{{- end }}
{{- if not .Values.ELASTICSEARCH_CONFIG_NAMES }}
- key: {{ .Values.EXTERNAL_SECRET_ELASTICSEARCH_PATH }}
value: |
{
"hostnames": {{ .Values.ELASTICSEARCH_BROKERS | quote }},
"port": {{ .Values.ELASTICSEARCH_PORT | quote }},
"username": {{ .Values.ELASTICSEARCH_USERNAME | quote }},
"password": {{ .Values.ELASTICSEARCH_PASSWORD | quote }}
}
{{- end }}
{{- if .Values.ELASTICSEARCH_CONFIG_NAMES }}
{{- range $cfgName := .Values.ELASTICSEARCH_CONFIG_NAMES }}
- key: {{ $.Values.EXTERNAL_SECRET_ELASTICSEARCH_PATH }}-{{$cfgName | lower}}
value: |
{
"hostnames": {{ (index $.Values (printf "%s_ELASTICSEARCH_BROKERS" ($cfgName | upper))) | quote }},
"port": {{ (index $.Values (printf "%s_ELASTICSEARCH_PORT" ($cfgName | upper))) | quote }},
"username": {{ (index $.Values (printf "%s_ELASTICSEARCH_USERNAME" ($cfgName | upper))) | quote }},
"password": {{ (index $.Values (printf "%s_ELASTICSEARCH_PASSWORD" ($cfgName | upper))) | quote }}
}
{{- end }}
{{- end }}
{{- end }}
38 changes: 38 additions & 0 deletions brownie/deployment/helm/templates/external-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,42 @@ spec:
key: {{ $.Values.EXTERNAL_SECRET_KAFKA_PATH }}-{{ $cfgName | lower }}
property: password
{{- end }}
{{- end }}
{{- if not .Values.ELASTICSEARCH_CONFIG_NAMES }}
- secretKey: ELASTICSEARCH_BROKERS
remoteRef:
key: {{ $.Values.EXTERNAL_SECRET_ELASTICSEARCH_PATH }}
property: hostnames
- secretKey: ELASTICSEARCH_PORT
remoteRef:
key: {{ $.Values.EXTERNAL_SECRET_ELASTICSEARCH_PATH }}
property: port
- secretKey: ELASTICSEARCH_USERNAME
remoteRef:
key: {{ $.Values.EXTERNAL_SECRET_ELASTICSEARCH_PATH }}
property: username
- secretKey: ELASTICSEARCH_PASSWORD
remoteRef:
key: {{ $.Values.EXTERNAL_SECRET_ELASTICSEARCH_PATH }}
property: password
{{- end }}
{{- if .Values.ELASTICSEARCH_CONFIG_NAMES }}
{{- range $cfgName := .Values.ELASTICSEARCH_CONFIG_NAMES }}
- secretKey: {{ $cfgName }}_ELASTICSEARCH_BROKERS
remoteRef:
key: {{ $.Values.EXTERNAL_SECRET_ELASTICSEARCH_PATH }}-{{ $cfgName | lower }}
property: hostnames
- secretKey: {{ $cfgName | upper }}_ELASTICSEARCH_PORT
remoteRef:
key: {{ $.Values.EXTERNAL_SECRET_ELASTICSEARCH_PATH }}-{{ $cfgName | lower }}
property: port
- secretKey: {{ $cfgName | upper }}_ELASTICSEARCH_USERNAME
remoteRef:
key: {{ $.Values.EXTERNAL_SECRET_ELASTICSEARCH_PATH }}-{{ $cfgName | lower }}
property: username
- secretKey: {{ $cfgName | upper }}_ELASTICSEARCH_PASSWORD
remoteRef:
key: {{ $.Values.EXTERNAL_SECRET_ELASTICSEARCH_PATH }}-{{ $cfgName | lower }}
property: password
{{- end }}
{{- end }}
Loading
Loading