File tree Expand file tree Collapse file tree
tests/templates/kuttl/smoke Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
22apiVersion: kuttl.dev/v1beta1
33kind: TestAssert
4- timeout: 300
5- ---
6- apiVersion: apps/v1
7- kind: StatefulSet
8- metadata:
9- name: test-kafka-broker-default
10- generation: 1 # There should be no unneeded Pod restarts
11- labels:
12- restarter.stackable.tech/enabled: "true"
13- spec:
14- template:
15- spec:
16- containers:
17- - name: kafka
18- resources:
19- limits:
20- cpu: 1100m # From podOverrides
21- memory: 2Gi
22- requests:
23- cpu: 300m # From podOverrides
24- memory: 2Gi
25- - name: kcat-prober
26- resources:
27- limits:
28- cpu: 200m
29- memory: 128Mi
30- requests:
31- cpu: 100m
32- memory: 128Mi
33- {% if lookup ('env' , 'VECTOR_AGGREGATOR' ) %}
34- - name: vector
35- resources:
36- limits:
37- cpu: 500m
38- memory: 128Mi
39- requests:
40- cpu: 250m
41- memory: 128Mi
42- {% endif %}
43- terminationGracePeriodSeconds: 1800
44- volumes:
45- {% if test_scenario ['values' ]['use-client-tls' ] == 'true' %}
46- - name: tls-kcat
47- ephemeral:
48- volumeClaimTemplate:
49- metadata:
50- annotations:
51- secrets.stackable.tech/backend.autotls.cert.lifetime: 7d
52- - name: tls-kafka-server
53- ephemeral:
54- volumeClaimTemplate:
55- metadata:
56- annotations:
57- secrets.stackable.tech/backend.autotls.cert.lifetime: 7d
58- {% endif %}
59- - name: tls-kafka-internal
60- ephemeral:
61- volumeClaimTemplate:
62- metadata:
63- annotations:
64- secrets.stackable.tech/backend.autotls.cert.lifetime: 7d
65- - name: log-config
66- - name: listener-broker
67- - name: config
68- - name: log
69- status:
70- readyReplicas: 1
71- replicas: 1
72- ---
73- apiVersion: v1
74- kind: PersistentVolumeClaim
75- metadata:
76- name: log-dirs-test-kafka-broker-default-0
77- spec:
78- resources:
79- requests:
80- storage: 2Gi
81- status:
82- phase: Bound
83- ---
84- apiVersion: policy/v1
85- kind: PodDisruptionBudget
86- metadata:
87- name: test-kafka-broker
88- status:
89- expectedPods: 1
90- currentHealthy: 1
91- disruptionsAllowed: 1
4+ timeout: 600
5+ commands:
6+ - script: kubectl -n $NAMESPACE wait --for=condition=available=true kafkaclusters.kafka.stackable.tech/test-kafka --timeout 601s
Original file line number Diff line number Diff line change @@ -6,14 +6,11 @@ commands:
66 #
77 # Test envOverrides
88 #
9+ # configOverrides are covered by the ConfigMap data snapshot in 34-assert.yaml.j2;
10+ # env overrides cannot be snapshotted there because the operator emits a random
11+ # NODE_ID_OFFSET into the StatefulSet env array (kuttl matches arrays positionally),
12+ # so we keep these targeted yq checks here.
913 - script : |
1014 kubectl -n $NAMESPACE get sts test-kafka-broker-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "kafka") | .env[] | select (.name == "COMMON_VAR" and .value == "group-value")'
1115 kubectl -n $NAMESPACE get sts test-kafka-broker-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "kafka") | .env[] | select (.name == "GROUP_VAR" and .value == "group-value")'
1216 kubectl -n $NAMESPACE get sts test-kafka-broker-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "kafka") | .env[] | select (.name == "ROLE_VAR" and .value == "role-value")'
13- #
14- # Test configOverrides
15- #
16- - script : |
17- kubectl -n $NAMESPACE get cm test-kafka-broker-default -o yaml | yq -e '.data."broker.properties"' | grep "compression.type=snappy"
18- kubectl -n $NAMESPACE get cm test-kafka-broker-default -o yaml | yq -e '.data."broker.properties"' | grep "controller.quorum.election.backoff.max.ms=2000"
19- kubectl -n $NAMESPACE get cm test-kafka-broker-default -o yaml | yq -e '.data."broker.properties"' | grep "controller.quorum.fetch.timeout.ms=3000"
You can’t perform that action at this time.
0 commit comments