Skip to content

Commit 084bd73

Browse files
Enable complete log aggregation in all integration tests (#310)
# Description Enable complete log aggregation in all integration tests
1 parent c4495ee commit 084bd73

20 files changed

+129
-57
lines changed

tests/templates/kuttl/orphaned-resources/00-assert.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestAssert
4+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
5+
---
6+
apiVersion: v1
7+
kind: ConfigMap
8+
metadata:
9+
name: vector-aggregator-discovery
10+
{% endif %}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
2+
---
3+
apiVersion: v1
4+
kind: ConfigMap
5+
metadata:
6+
name: vector-aggregator-discovery
7+
data:
8+
ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }}
9+
{% endif %}

tests/templates/kuttl/orphaned-resources/01-assert.yaml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,7 @@ timeout: 600
66
apiVersion: apps/v1
77
kind: StatefulSet
88
metadata:
9-
name: test-hdfs-namenode-default
10-
status:
11-
readyReplicas: 2
12-
replicas: 2
13-
---
14-
apiVersion: apps/v1
15-
kind: StatefulSet
16-
metadata:
17-
name: test-hdfs-journalnode-default
18-
status:
19-
readyReplicas: 1
20-
replicas: 1
21-
---
22-
apiVersion: apps/v1
23-
kind: StatefulSet
24-
metadata:
25-
name: test-hdfs-datanode-default
26-
status:
27-
readyReplicas: 1
28-
replicas: 1
29-
---
30-
apiVersion: apps/v1
31-
kind: StatefulSet
32-
metadata:
33-
name: test-hdfs-datanode-remove
9+
name: test-zk-server-default
3410
status:
3511
readyReplicas: 1
3612
replicas: 1

tests/templates/kuttl/orphaned-resources/00-install-zookeeper.yaml.j2 renamed to tests/templates/kuttl/orphaned-resources/01-install-zookeeper.yaml.j2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@ spec:
77
image:
88
productVersion: "{{ test_scenario['values']['zookeeper-latest'].split('-stackable')[0] }}"
99
stackableVersion: "{{ test_scenario['values']['zookeeper-latest'].split('-stackable')[1] }}"
10+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
11+
clusterConfig:
12+
logging:
13+
vectorAggregatorConfigMapName: vector-aggregator-discovery
14+
{% endif %}
1015
servers:
1116
config:
17+
logging:
18+
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
1219
resources:
1320
cpu:
1421
min: '300m'
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestAssert
4+
timeout: 600
5+
---
6+
apiVersion: apps/v1
7+
kind: StatefulSet
8+
metadata:
9+
name: test-hdfs-namenode-default
10+
status:
11+
readyReplicas: 2
12+
replicas: 2
13+
---
14+
apiVersion: apps/v1
15+
kind: StatefulSet
16+
metadata:
17+
name: test-hdfs-journalnode-default
18+
status:
19+
readyReplicas: 1
20+
replicas: 1
21+
---
22+
apiVersion: apps/v1
23+
kind: StatefulSet
24+
metadata:
25+
name: test-hdfs-datanode-default
26+
status:
27+
readyReplicas: 1
28+
replicas: 1
29+
---
30+
apiVersion: apps/v1
31+
kind: StatefulSet
32+
metadata:
33+
name: test-hdfs-datanode-remove
34+
status:
35+
readyReplicas: 1
36+
replicas: 1

tests/templates/kuttl/orphaned-resources/01-install-hdfs.yaml.j2 renamed to tests/templates/kuttl/orphaned-resources/02-install-hdfs.yaml.j2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ spec:
88
productVersion: "{{ test_scenario['values']['hadoop-latest'].split('-stackable')[0] }}"
99
stackableVersion: "{{ test_scenario['values']['hadoop-latest'].split('-stackable')[1] }}"
1010
zookeeperConfigMapName: test-znode
11+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
12+
vectorAggregatorConfigMapName: vector-aggregator-discovery
13+
{% endif %}
1114
dfsReplication: 1
1215
nameNodes:
1316
config:
17+
logging:
18+
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
1419
resources:
1520
cpu:
1621
max: '1'
@@ -22,6 +27,8 @@ spec:
2227
replicas: 2
2328
dataNodes:
2429
config:
30+
logging:
31+
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
2532
resources:
2633
cpu:
2734
max: '1'
@@ -35,6 +42,8 @@ spec:
3542
replicas: 1
3643
journalNodes:
3744
config:
45+
logging:
46+
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
3847
resources:
3948
cpu:
4049
max: '1'

tests/templates/kuttl/orphaned-resources/04-change-datanode-rolegroup.yaml renamed to tests/templates/kuttl/orphaned-resources/04-change-datanode-rolegroup.yaml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ metadata:
66
spec:
77
dataNodes:
88
config:
9+
logging:
10+
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
911
resources:
1012
cpu:
1113
max: '1'
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestAssert
4+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
5+
---
6+
apiVersion: v1
7+
kind: ConfigMap
8+
metadata:
9+
name: vector-aggregator-discovery
10+
{% endif %}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
2+
---
3+
apiVersion: v1
4+
kind: ConfigMap
5+
metadata:
6+
name: vector-aggregator-discovery
7+
data:
8+
ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }}
9+
{% endif %}

0 commit comments

Comments
 (0)