Skip to content

Commit 0b60d4b

Browse files
test(smoke): Fix assertions (#712)
1 parent 1758ded commit 0b60d4b

1 file changed

Lines changed: 41 additions & 3 deletions

File tree

tests/templates/kuttl/smoke/60-assert.yaml.j2

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,6 @@ spec:
143143
topologyKey: kubernetes.io/hostname
144144
weight: 70
145145
containers:
146-
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
147-
- name: vector
148-
{% endif %}
149146
- args:
150147
- |
151148
echo copying /stackable/mount/config to /stackable/config
@@ -290,10 +287,51 @@ spec:
290287
name: log-config-mount
291288
- mountPath: /stackable/listener
292289
name: listener
290+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
291+
- args:
292+
- |
293+
mkdir --parents /stackable/log/_vector-state
294+
# Vector will ignore SIGTERM (as PID != 1) and must be shut down by writing a shutdown trigger file
295+
vector --config /stackable/config/vector.yaml & vector_pid=$!
296+
if [ ! -f "/stackable/log/_vector/shutdown" ]; then
297+
mkdir -p /stackable/log/_vector && inotifywait -qq --event create /stackable/log/_vector; fi
298+
sleep 1
299+
kill $vector_pid
300+
command:
301+
- /bin/bash
302+
- -x
303+
- -euo
304+
- pipefail
305+
- -c
306+
env:
307+
- name: VECTOR_LOG
308+
value: info
309+
- name: VECTOR_AGGREGATOR_ADDRESS
310+
valueFrom:
311+
configMapKeyRef:
312+
key: ADDRESS
313+
name: vector-aggregator-discovery
314+
imagePullPolicy: IfNotPresent
315+
name: vector
316+
resources:
317+
limits:
318+
cpu: 500m
319+
memory: 128Mi
320+
requests:
321+
cpu: 250m
322+
memory: 128Mi
323+
volumeMounts:
324+
- mountPath: /stackable/config
325+
name: config-mount
326+
- mountPath: /stackable/log
327+
name: log
328+
{% endif %}
293329
dnsPolicy: ClusterFirst
294330
enableServiceLinks: false
295331
restartPolicy: Always
296332
schedulerName: default-scheduler
333+
securityContext:
334+
fsGroup: 1000
297335
serviceAccount: hive-serviceaccount
298336
serviceAccountName: hive-serviceaccount
299337
terminationGracePeriodSeconds: 300

0 commit comments

Comments
 (0)