Files
infrastructure/clusters/cl01tl/manifests/openbao/Pod-openbao-server-test.yaml

39 lines
1015 B
YAML

apiVersion: v1
kind: Pod
metadata:
name: openbao-server-test
namespace: openbao
annotations:
"helm.sh/hook": test
spec:
containers:
- name: openbao-server-test
image: quay.io/openbao/openbao:2.5.2@sha256:6c75c97223873807260352f269640935a07db0c26b3dbf12a98a36ec43ad9878
imagePullPolicy: IfNotPresent
env:
- name: VAULT_ADDR
value: http://openbao.openbao.svc:8200
command:
- /bin/sh
- -c
- |
echo "Checking for sealed info in 'bao status' output"
ATTEMPTS=10
n=0
until [ "$n" -ge $ATTEMPTS ]
do
echo "Attempt" $n...
bao status -format yaml | grep -E '^sealed: (true|false)' && break
n=$((n+1))
sleep 5
done
if [ $n -ge $ATTEMPTS ]; then
echo "timed out looking for sealed info in 'bao status' output"
exit 1
fi
exit 0
volumeMounts:
volumes:
restartPolicy: Never