e2e: add a monitor container to the vault Pod

The command `vault monitor` can be used to stream logging from the Vault
service. This is very helpful while debugging Vault configuration
failures.

By adding a 2nd container to the Vault deployment, it is now possible to
get the messages from the Vault service by running

    $ kubectl logs -c monitor <vault-pod-0123abcd>

This will be very useful when the e2e tests do not delete the deployment
after a failure and fetch the logs from all containers.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2021-10-15 16:08:37 +02:00 committed by mergify[bot]
parent 0d51f6d833
commit 85c84910d3

View File

@ -48,6 +48,8 @@ spec:
value: sample_root_token_id
- name: SKIP_SETCAP
value: any
- name: HOME
value: /home
livenessProbe:
exec:
command:
@ -58,6 +60,28 @@ spec:
ports:
- containerPort: 8200
name: vault-api
volumeMounts:
- name: home
mountPath: /home
- name: monitor
image: docker.io/library/vault:latest
imagePullPolicy: "IfNotPresent"
securityContext:
runAsUser: 100
env:
- name: VAULT_ADDR
value: http://localhost:8200
- name: HOME
value: /home
command:
- vault
- monitor
volumeMounts:
- name: home
mountPath: /home
volumes:
- name: home
emptyDir: {}
---
apiVersion: v1
kind: ConfigMap