Add helm test pre-rollout hook example to podinfo chart

This commit is contained in:
stefanprodan
2019-06-04 16:15:25 +03:00
parent fd50c4b4b7
commit eace3713ce
3 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
apiVersion: v1
version: 2.0.1
version: 2.1.0
appVersion: 1.4.0
name: podinfo
engine: gotpl
+11 -2
View File
@@ -38,8 +38,17 @@ spec:
- name: request-duration
threshold: {{ .Values.canary.thresholds.latency }}
interval: 1m
{{- if .Values.canary.loadtest.enabled }}
webhooks:
{{- if .Values.canary.helmtest.enabled }}
- name: "helm test"
type: pre-rollout
url: {{ .Values.canary.helmtest.url }}
timeout: 3m
metadata:
type: "helm"
cmd: "test {{ .Release.Name }} --cleanup"
{{- end }}
{{- if .Values.canary.loadtest.enabled }}
- name: load-test-get
url: {{ .Values.canary.loadtest.url }}
timeout: 5s
@@ -50,5 +59,5 @@ spec:
timeout: 5s
metadata:
cmd: "hey -z 1m -q 5 -c 2 -m POST -d '{\"test\": true}' http://{{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.port }}/echo"
{{- end }}
{{- end }}
{{- end }}
+4
View File
@@ -45,6 +45,10 @@ canary:
enabled: false
# load tester address
url: http://flagger-loadtester.test/
helmtest:
enabled: false
# helm tester address
url: http://flagger-helmtester.kube-system/
resources:
limits: