提交 6c90eae7 编写于 作者: C Christian Weichel

[dev/jaeger] Remove elasticsearch dependency from Jaeger

上级 b1555214
# ElasticSearch
We're running a bit of an unsual ElasticSearch setup: we have just one node. This means we must set the replicas per index to zero so that the shards are assigned to our single node. This setting is stored in the PV.
## How do I find out if this is the issue?
Exec into the elasticsearch container and run `curl localhost:9200/_cluster/health/?pretty=true`.
If there unassigned shards, this might be the issue.
## How do I fix it?
Run the following:
```
cat <<EOF | kubectl exec -i --namespace monitoring elasticsearch-master-0 -- bash
curl -XPUT -H "Content-Type: application/json" 'http://localhost:9200/_all/_settings' -d '{"index.number_of_replicas" : "0"}'
curl -XPUT -H "Content-Type: application/json" 'http://localhost:9200/_template/all' -d '{"template": "*", "settings": { "number_of_replicas": 0 }}'
EOF
```
dependencies:
- name: elasticsearch
repository: https://helm.elastic.co
version: 7.4.1
digest: sha256:325cb5a7f3f6d8744d1ea707f8d4e990e55876dd746b211411f2a187576e1f6a
generated: "2020-06-30T18:34:48.959794813Z"
dependencies:
- name: elasticsearch
version: 7.4.1
repository: https://helm.elastic.co
condition: elasticsearch.enabled
\ No newline at end of file
{{ if eq .Values.jaeger.storage "elasticsearch" -}}
apiVersion: v1
kind: Secret
metadata:
name: elastic-credentials
labels:
app: jaeger
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
password: {{ randAlphaNum 20 | b64enc | quote }}
{{- end }}
\ No newline at end of file
{{ if .Values.elasticsearch.enabled -}}
apiVersion: batch/v1
kind: Job
metadata:
name: elasticsearch-set-replica-count
labels:
kind: job
component: elasticsearch-set-replica-count
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
annotations:
# This is what defines this resource as a hook. Without this line, the
# job is considered part of the release.
# see https://github.com/helm/helm/blob/master/docs/charts_hooks.md
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-weight": "5"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
"helm.sh/hook-delete-timeout": "0"
spec:
template:
metadata:
name: elasticsearch-set-replica-count
labels:
kind: job
component: elasticsearch-set-replica-count
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
restartPolicy: Never
serviceAccountName: monitoring-jaeger
containers:
- name: elasticsearch-set-replica-count
image: "csweichel/alpine-curl:latest"
command:
- sh
- -c
- |
sleep 60;
curl -XPUT -H 'Content-Type: application/json' 'http://elasticsearch-master:9200/_all/_settings' -d '{"index.number_of_replicas" : "0"}';
curl -XPUT -H "Content-Type: application/json" 'http://elasticsearch-master:9200/_template/all' -d '{"template": "*", "settings": { "number_of_replicas": 0 }}';
{{- end }}
\ No newline at end of file
......@@ -41,19 +41,6 @@ spec:
env:
- name: SPAN_STORAGE_TYPE
value: badger
{{- else if eq .Values.jaeger.storage "elasticsearch" }}
env:
- name: SPAN_STORAGE_TYPE
value: elasticsearch
- name: ES_PASSWORD
valueFrom:
secretKeyRef:
name: elastic-credentials
key: password
- name: ES_SERVER_URLS
value: http://elasticsearch-master:9200
- name: ES_USERNAME
value: elastic
{{- end }}
ports:
- containerPort: 16686
......
......@@ -13,6 +13,3 @@ jaeger:
operator: In
values:
- 'true'
elasticsearch:
enabled: false
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册