I know it's possible to change the timeout option when performing helm test
from the command line by using the --timeout
flag on the command line.
Is there a way to specify that in the template file instead?
If the tests are specified as Job
s instead of Pod
s, a deadline can be specified in the JobSpec
by setting the activeDeadlineSeconds
field.
apiVersion: batch/v1
kind: Job
metadata:
name: "{{ include "helm-test-timeout.fullname" . }}-test-timeout"
labels:
{{ include "helm-test-timeout.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
spec:
activeDeadlineSeconds: 30
template:
spec:
containers:
# The nginx container will just launch and wait
# and cause the test to time out
- name: nginx
image: nginx
restartPolicy: Never
However, this deadline cannot be extended with the --timeout
flag to helm test
.