Skip to content

Commit 094ecaa

Browse files
committed
fix configuration tests
1 parent 34bde59 commit 094ecaa

5 files changed

Lines changed: 71 additions & 41 deletions

File tree

tests/templates/kuttl/configuration/10-assert.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/templates/kuttl/configuration/20-assert.yaml.j2 renamed to tests/templates/kuttl/configuration/10-assert.yaml.j2

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ timeout: 300
66
apiVersion: apps/v1
77
kind: StatefulSet
88
metadata:
9-
name: test-kafka-broker-default
9+
name: test-kafka-controller-default
1010
spec:
1111
template:
1212
spec:
@@ -23,6 +23,39 @@ spec:
2323
cpu: 250m
2424
# value set in the rolegroup configuration
2525
memory: 2Gi
26+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
27+
- name: vector
28+
{% endif %}
29+
volumeClaimTemplates:
30+
- metadata:
31+
name: log-dirs
32+
spec:
33+
resources:
34+
requests:
35+
# value set in the role configuration and overridden in
36+
# the rolegroup configuration
37+
storage: 1Gi
38+
---
39+
apiVersion: apps/v1
40+
kind: StatefulSet
41+
metadata:
42+
name: test-kafka-broker-default
43+
spec:
44+
template:
45+
spec:
46+
containers:
47+
- name: kafka
48+
resources:
49+
limits:
50+
# value set in the role configuration
51+
cpu: 500m
52+
# value set in the rolegroup configuration
53+
memory: 3Gi
54+
requests:
55+
# default value set by the operator
56+
cpu: 250m
57+
# value set in the rolegroup configuration
58+
memory: 3Gi
2659
- name: kcat-prober
2760
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
2861
- name: vector

tests/templates/kuttl/configuration/20-install-kafka.yaml.j2 renamed to tests/templates/kuttl/configuration/10-install-kafka.yaml.j2

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ spec:
1818
pullPolicy: IfNotPresent
1919
clusterConfig:
2020
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
21+
clusterConfig:
2122
vectorAggregatorConfigMapName: vector-aggregator-discovery
2223
{% endif %}
23-
zookeeperConfigMapName: test-zk
24-
brokers:
24+
controllers:
2525
config:
2626
logging:
2727
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
@@ -37,7 +37,7 @@ spec:
3737
storage:
3838
logDirs:
3939
# Override the default value '2Gi' set by the operator
40-
capacity: '1Gi'
40+
capacity: '1.5Gi'
4141
roleGroups:
4242
default:
4343
config:
@@ -50,6 +50,40 @@ spec:
5050
memory:
5151
# Override the default value '1Gi' set by the operator
5252
limit: '2Gi'
53+
storage:
54+
logDirs:
55+
# Override the value '1.5Gi' set in the role configuration
56+
capacity: '1Gi'
57+
replicas: 1
58+
brokers:
59+
config:
60+
logging:
61+
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
62+
resources:
63+
cpu:
64+
# Inherit the default value '250m' set by the operator
65+
# min: '250m'
66+
# Override the default value '1' set by the operator
67+
max: '500m'
68+
# memory:
69+
# Inherit the default value '2Gi' set by the operator
70+
# limit: '2Gi'
71+
storage:
72+
logDirs:
73+
# Override the default value '2Gi' set by the operator
74+
capacity: '1.5Gi'
75+
roleGroups:
76+
default:
77+
config:
78+
resources:
79+
# cpu:
80+
# Inherit the default value '250m' set by the operator
81+
# min: '250m'
82+
# Inherit the value '1000m' set in the role configuration
83+
# max: '1000m'
84+
memory:
85+
# Override the default value '2Gi' set by the operator
86+
limit: '3Gi'
5387
storage:
5488
logDirs:
5589
# Override the value '2Gi' set in the role configuration

tests/templates/kuttl/configuration/10-install-zk.yaml.j2

Lines changed: 0 additions & 24 deletions
This file was deleted.

tests/test-definition.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ tests:
7777
- name: configuration
7878
dimensions:
7979
- kafka-latest
80-
- zookeeper-latest
8180
- openshift
8281
- name: upgrade
8382
dimensions:

0 commit comments

Comments
 (0)