this is below my test-connection.yml
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "demohelmapi.fullname" . }}-test-connection"
labels:
{{- include "demohelmapi.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "demohelmapi.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never
when run test use this command (“helm install demohelmapi” than run “helm test demohelmapi”)
if any error in test and test pod failed to show error message in NOTES.txt in helm chart
if there are pass unavailable image in test pod
containers:
- name: wget
image: abc-pqr // there are not available image in my pc
command: ['wget']
args: ['{{ include "demohelmapi.fullname" . }}:{{ .Values.service.port }}']
when check minikube dashboard
there are show error message “Failed to pull image “abc-pqr”: Error response from daemon: pull access denied for abc-pqr, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied”
i want to show this message in NOTES.txt direct show error message without call any command in terminal
there are many try but not get error message in NOTES.txt file when call command (helm test demohelmapi)
dev@root:~/Project/Helmprojects/demohelmapi$ helm test demohelmapi
NAME: demohelmapi
LAST DEPLOYED: Mon Jun 3 18:14:07 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: checkpod-test
Last Started: Mon Jun 3 18:14:16 2024
Last Completed: Mon Jun 3 18:15:45 2024
Phase: Failed
NOTES:
1. Get the application URL by running these commands:
export NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services demomvc-demohelm)
export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}")
export createdate=2024-06-03
echo http://$NODE_IP:$NODE_PORT
<i want to show error message here > // see this