Skip to content

Commit 3714de3

Browse files
committed
Fix various elasticsearch usage issues
Signed-off-by: Steven Erb <stevenpc3@live.com>
1 parent ff33317 commit 3714de3

14 files changed

Lines changed: 439 additions & 408 deletions

charts/jaeger/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ appVersion: 2.14.1
33
description: A Jaeger Helm chart for Kubernetes
44
name: jaeger
55
type: application
6-
version: 4.3.4
6+
version: 4.3.5
77
# CronJobs require v1.21
88
kubeVersion: ">= 1.21-0"
99
keywords:

charts/jaeger/README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ helm install jaeger jaegertracing/jaeger
5959
### 2. Elasticsearch (Production Recommended)
6060
Configure Jaeger to connect to Elasticsearch using the native config syntax.
6161

62+
Adding memory to ANY storage will cause jeager to use memory. To completely override and NOT use memory please use 'userconfig' to completely override if using external storage
63+
64+
This chart defaults to using memory
65+
66+
You can use an internal provisioned Elasticsearch by setting ```provisionDataStore.elasticsearch=true```
67+
68+
The internal elasticsearch is configured to __NOT__ require a password or username.
69+
70+
You can also set up to use an external elasticsearch by changing the ```server_urls``` value.
71+
6272
**values.yaml Example:**
6373
```yaml
6474
# Use the provisioned Elasticsearch subchart
@@ -73,17 +83,22 @@ config:
7383
primary_store:
7484
elasticsearch:
7585
server_urls: ["http://elasticsearch:9200"]
76-
username: elastic
77-
password: changeme
86+
auth:
87+
basic:
88+
username: elastic
89+
password: changeme
7890
```
7991
8092
**Running Maintenance Jobs:**
81-
To run Index Cleaner or Rollover jobs, enable them. They auto-configure when `provisionDataStore.elasticsearch` is enabled:
93+
To run Index Cleaner or Rollover jobs, enable them. They require configuration if using external by setting ```storage.type=elasticsearch``` and adjusting ```storage.elasticsearch``` values. See that section in values.yaml for more details.
94+
8295
```yaml
8396
esIndexCleaner:
8497
enabled: true
8598
```
8699

100+
* es-rollover __requires__ elasticsearch to be running __BEFORE__ install so the hook job can run.
101+
87102
### 3. Cassandra
88103
This chart does not provision a Cassandra cluster. To use Cassandra storage, you must provide your own Cassandra instance and configure Jaeger via the native config syntax:
89104

@@ -110,14 +125,16 @@ config:
110125

111126
### 4. Spark Dependencies
112127

113-
To run the Spark dependencies job (for dependency links graph):
128+
To run the Spark dependencies job (for dependency links graph) set ```spark.enabled=true```
129+
130+
Below is an example of how to set overrides. Please see the values.yaml for more examples:
131+
132+
The values are populated under ```storage.elasticsearch``` Please see comments in values.yaml for more details.
114133

115134
```yaml
116135
spark:
117136
enabled: true
118137
extraEnv:
119-
- name: ES_NODES
120-
value: http://elasticsearch:9200
121138
- name: ES_NODES_WAN_ONLY
122139
value: "true"
123140
```

charts/jaeger/templates/_helpers.tpl

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -233,24 +233,21 @@ Elasticsearch related environment variables
233233
{{- define "elasticsearch.env" -}}
234234
{{- if or .Values.provisionDataStore.elasticsearch (eq .Values.storage.type "elasticsearch") -}}
235235
{{- $es := .Values.storage.elasticsearch | default dict -}}
236-
{{- $scheme := $es.scheme | default "http" -}}
237-
{{- $port := $es.port | default 9200 -}}
238236
{{- $user := $es.user | default "elastic" -}}
239-
{{- $password := .Values.elasticsearch.secret.password | default "changeme" -}}
237+
{{- $password := $es.password | default "changeme" -}}
238+
{{- $url := $es.url | default "http://elasticsearch-master:9200" -}}
240239
- name: ES_SERVER_URLS
241-
value: "{{ $scheme }}://elasticsearch-master:{{ $port }}"
240+
value: {{ $url | quote }}
241+
- name: ES_NODES
242+
value: {{ $url | quote }}
242243
- name: ES_USERNAME
243244
value: {{ $user | quote }}
244245
- name: ES_PASSWORD
245246
value: {{ $password | quote }}
246247
{{- /* Handle TLS insecurity */ -}}
247-
{{- if or ( and $es.tls ( $es.tls.insecure ) ) ( eq $scheme "https" ) }}
248-
{{- if $es.tls }}
249-
{{- if $es.tls.insecure }}
248+
{{- if and (($es).tls).enabled (($es).tls).insecure }}
250249
- name: ES_TLS_SKIP_HOST_VERIFY
251250
value: "true"
252-
{{- end }}
253-
{{- end }}
254251
{{- end }}
255252
{{- end }}
256253
{{- end -}}

0 commit comments

Comments
 (0)