Preview: We started working on helm 3 to deploy our applications on k8s and we have come to good stage with deploying the charts successfully. However we are very new to implement tests under helm charts. For example I am deploying pdfreactor official image and i can check the web application version details either by using browser "https://ift.tt/2Y22UJl" or by "curl http://172.27.1.119:31423/service/". Now I want to write a helm test to check the same. The below is pdfreactor-test.yaml (reference link: https://helm.sh/docs/topics/chart_tests/)
apiVersion: v1
kind: Pod
metadata:
name: "-credentials-test"
annotations:
"helm.sh/hook": test
spec:
containers:
- name: -credentials-test
image:
imagePullPolicy:
command:
- /bin/bash
- curl http://172.27.1.119:31423/service/
When i ran
helm install pdfreactor <chart name>
helm test pdfreactor
I got below response
NAME: pdfreactor
LAST DEPLOYED: Thu Aug 13 09:02:55 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Thank you for installing pdfreactor.
Below are my challenges.
- Need to understand what am i doing wrong?
- How exactly the helm test will work? Does it create a new pod and test, or does it test on existing pod?
- What is the purpose of giving image details in test.yaml?
Note: I have even used the default template generated with helm create.
Aucun commentaire:
Enregistrer un commentaire