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 @@ -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
You can’t perform that action at this time.
0 commit comments