Skip to content

Commit

Permalink
test(vector): optional the elasticsearch sink in vector e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
lwpk110 committed Nov 11, 2024
1 parent 7b45564 commit 72f602d
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 87 deletions.
4 changes: 2 additions & 2 deletions .chainsaw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
delete: 120s
error: 180s
exec: 300s
# skipDelete: false
skipDelete: true
skipDelete: false
# skipDelete: true
failFast: true
parallel: 1
13 changes: 1 addition & 12 deletions test/e2e/vector/aggregator-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: vector-aggregator
---
apiVersion: v1
kind: Service
metadata:
name: vector-aggregator
spec:
type: ClusterIP
---

apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand Down
92 changes: 19 additions & 73 deletions test/e2e/vector/aggregator.yaml
Original file line number Diff line number Diff line change
@@ -1,64 +1,4 @@
apiVersion: v1
kind: Pod
metadata:
name: elasticsearch
labels:
app: elasticsearch
spec:
containers:
- name: es7
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.7
resources:
limits:
cpu: 200m
memory: 1Gi
env:
- name: discovery.type
value: "single-node"
- name: bootstrap.memory_lock
value: "true"
- name: ES_JAVA_OPTS
value: "-Xms512m -Xmx512m"
- name: transport.host
value: "127.0.0.1"
- name: xpack.security.enabled
value: "false"
ports:
- containerPort: 9200
name: http
- name: kibana7
image: docker.elastic.co/kibana/kibana:7.17.7
resources:
limits:
cpu: 200m
memory: 500Mi
env:
- name: ELASTICSEARCH_HOSTS
value: "http://localhost:9200"
- name: i18n.locale
value: "zh-CN"
- name: xpack.security.enabled
value: "false"
ports:
- containerPort: 5601
name: kibana
---
## create svc for elasticsearch
apiVersion: v1
kind: Service
metadata:
name: elasticsearch
spec:
ports:
- name: http
port: 9200
protocol: TCP
targetPort: 9200
selector:
app: elasticsearch
type: ClusterIP

---
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -76,20 +16,20 @@ data:
- vector
encoding:
codec: "json"
essink:
type: elasticsearch
inputs:
- vector
api_version: auto
compression: none
doc_type: _doc
endpoints:Copilot features might go through different early access stages, which are typically enabled and configured through settings.
# essink:
# type: elasticsearch
# inputs:
# - vector
# api_version: auto
# compression: none
# doc_type: _doc
# endpoints:Copilot features might go through different early access stages, which are typically enabled and configured through settings.
- http://elasticsearch:9200
mode: bulk
# query:
# X-Powered-By: Vector
# - http://elasticsearch:9200
# mode: bulk
# # query:
# # X-Powered-By: Vector
sources:
vector:
address: 0.0.0.0:6000
Expand Down Expand Up @@ -159,7 +99,13 @@ spec:
- containerPort: 6000
name: vector
protocol: TCP
# resources: {}
resources:
limits:
cpu: 200m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
volumeMounts:
- mountPath: /vector-data-dir
name: data
Expand Down
21 changes: 21 additions & 0 deletions test/e2e/vector/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ spec:
value: test
steps:
- try:
# - apply:
# file: elasticsearch-sink.yaml
# - assert:
# file: elasticsearch-sink-assert.yaml
- apply:
file: aggregator.yaml
- assert:
Expand All @@ -32,3 +36,20 @@ spec:
cleanup:
- sleep:
duration: 10s
catch:
- sleep:
duration: 5s
- script:
env:
- name: NAMESPACE
value: ($namespace)
content: |
set -ex
kubectl -n $NAMESPACE get pods
- describe:
apiVersion: v1
kind: Pod
selector: app.kubernetes.io/instance=test-dolphinscheduler
- podLogs:
selector: app.kubernetes.io/instance=test-dolphinscheduler
tail: -1
11 changes: 11 additions & 0 deletions test/e2e/vector/elasticsearch-sink-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: vector-aggregator
---
apiVersion: v1
kind: Service
metadata:
name: vector-aggregator
spec:
type: ClusterIP
59 changes: 59 additions & 0 deletions test/e2e/vector/elasticsearch-sink.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
apiVersion: v1
kind: Pod
metadata:
name: elasticsearch
labels:
app: elasticsearch
spec:
containers:
- name: es7
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.7
resources:
limits:
cpu: 200m
memory: 1Gi
env:
- name: discovery.type
value: "single-node"
- name: bootstrap.memory_lock
value: "true"
- name: ES_JAVA_OPTS
value: "-Xms512m -Xmx512m"
- name: transport.host
value: "127.0.0.1"
- name: xpack.security.enabled
value: "false"
ports:
- containerPort: 9200
name: http
- name: kibana7
image: docker.elastic.co/kibana/kibana:7.17.7
resources:
limits:
cpu: 200m
memory: 500Mi
env:
- name: ELASTICSEARCH_HOSTS
value: "http://localhost:9200"
- name: i18n.locale
value: "zh-CN"
- name: xpack.security.enabled
value: "false"
ports:
- containerPort: 5601
name: kibana
---
# create svc for elasticsearch
apiVersion: v1
kind: Service
metadata:
name: elasticsearch
spec:
ports:
- name: http
port: 9200
protocol: TCP
targetPort: 9200
selector:
app: elasticsearch
type: ClusterIP

0 comments on commit 72f602d

Please sign in to comment.