提交 ddb4f06f 编写于 作者: I innerpeacez

two ways to deploy sw

上级 d2c837bd
...@@ -74,5 +74,9 @@ Create the name of the service account to use for the oap cluster ...@@ -74,5 +74,9 @@ Create the name of the service account to use for the oap cluster
- name: wait-for-elasticsearch - name: wait-for-elasticsearch
image: busybox:1.30 image: busybox:1.30
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
{{- if .Values.elasticsearch.enabled }}
command: ['sh', '-c', 'for i in $(seq 1 60); do nc -z -w3 {{ include "call-nested" (list . "elasticsearch" "elasticsearch.client.fullname") }} 9200 && exit 0 || sleep 5; done; exit 1'] command: ['sh', '-c', 'for i in $(seq 1 60); do nc -z -w3 {{ include "call-nested" (list . "elasticsearch" "elasticsearch.client.fullname") }} 9200 && exit 0 || sleep 5; done; exit 1']
{{- else }}
command: ['sh', '-c', 'for i in $(seq 1 60); do nc -z -w3 {{ .Values.elasticsearch.config.host }} {{ .Values.elasticsearch.config.port.http }} && exit 0 || sleep 5; done; exit 1']
{{- end }}
{{- end -}} {{- end -}}
...@@ -50,7 +50,7 @@ spec: ...@@ -50,7 +50,7 @@ spec:
- name: SW_STORAGE - name: SW_STORAGE
value: elasticsearch value: elasticsearch
- name: SW_STORAGE_ES_CLUSTER_NODES - name: SW_STORAGE_ES_CLUSTER_NODES
{{- if.Values.elasticsearch.enabled }} {{- if .Values.elasticsearch.enabled }}
value: "{{ include "call-nested" (list . "elasticsearch" "elasticsearch.client.fullname") }}:9200" value: "{{ include "call-nested" (list . "elasticsearch" "elasticsearch.client.fullname") }}:9200"
{{- else }} {{- else }}
value: "{{ .Values.elasticsearch.config.host }}:{{ .Values.elasticsearch.config.port.http }}" value: "{{ .Values.elasticsearch.config.host }}:{{ .Values.elasticsearch.config.port.http }}"
......
...@@ -111,7 +111,11 @@ spec: ...@@ -111,7 +111,11 @@ spec:
value: {{ .Values.oap.envoy.als.enabled | quote}} value: {{ .Values.oap.envoy.als.enabled | quote}}
{{- end }} {{- end }}
- name: SW_STORAGE_ES_CLUSTER_NODES - name: SW_STORAGE_ES_CLUSTER_NODES
{{- if .Values.elasticsearch.enabled }}
value: "{{ include "call-nested" (list . "elasticsearch" "elasticsearch.client.fullname") }}:9200" value: "{{ include "call-nested" (list . "elasticsearch" "elasticsearch.client.fullname") }}:9200"
{{- else }}
value: "{{ .Values.elasticsearch.config.host }}:{{ .Values.elasticsearch.config.port.http }}"
{{- end }}
{{- range $key, $value := .Values.oap.env }} {{- range $key, $value := .Values.oap.env }}
- name: {{ $key }} - name: {{ $key }}
value: {{ $value | quote }} value: {{ $value | quote }}
......
...@@ -102,10 +102,10 @@ elasticsearch: ...@@ -102,10 +102,10 @@ elasticsearch:
enabled: true enabled: true
# If elasticsearch.enabled=true values for elasticsearch. # If elasticsearch.enabled=true values for elasticsearch.
# or elasticsearch.enabled=false, Will not deploy ES pod. The following config options must be configured # or elasticsearch.enabled=false, Will not deploy ES pod. The following config options must be configured
config: # config:
port: # port:
http: 9200 # http: 9200
host: elasticsearch # es service on kubernetes or host # host: elasticsearch # es service on kubernetes or host
## Define serviceAccount names for components. Defaults to component's fully qualified name. ## Define serviceAccount names for components. Defaults to component's fully qualified name.
serviceAccounts: serviceAccounts:
...@@ -180,7 +180,7 @@ elasticsearch: ...@@ -180,7 +180,7 @@ elasticsearch:
heapSize: "512m" heapSize: "512m"
# additionalJavaOpts: "-XX:MaxRAM=512m" # additionalJavaOpts: "-XX:MaxRAM=512m"
persistence: persistence:
enabled: true enabled: false
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
name: data name: data
size: "4Gi" size: "4Gi"
...@@ -227,7 +227,7 @@ elasticsearch: ...@@ -227,7 +227,7 @@ elasticsearch:
heapSize: "1536m" heapSize: "1536m"
# additionalJavaOpts: "-XX:MaxRAM=1536m" # additionalJavaOpts: "-XX:MaxRAM=1536m"
persistence: persistence:
enabled: true enabled: false
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
name: data name: data
size: "30Gi" size: "30Gi"
......
### How to use the SkyWalking Chart?
Two ways:
- deploy SkyWalking and Elasticsearch (default)
- only deploy SkyWalking ,and use existing Elasticsearch
#### Deploy SkyWalking and Elasticsearch (default)
```shell script
$ cd chart
$ helm add stable https://kubernetes-charts.storage.googleapis.com/
$ helm dep up
$ helm install <release_name> skywalking -n <namespace>
```
#### Only deploy SkyWalking ,and use existing Elasticsearch
If not want to deploy a new elasticsearch cluster, this way can be solved.
Only need to close the elasticsearch deployed by chart default and configure the existing elasticsearch connection method.
```shell script
$ cd chart
$ helm add stable https://kubernetes-charts.storage.googleapis.com/
$ helm dep up
$ helm install <release_name> skywalking -n <namespace> \
--set elasticsearch.enabled=false \
--set elasticsearch.config.host=<es_host> \
--set elasticsearch.config.port.http=<es_port>
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册