1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

feat: add helm test for reports controller (#6081)

* feat: add helm test for reports controller

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2023-01-23 19:16:37 +01:00 committed by GitHub
parent c933da999f
commit e4fe8a5b8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 3 deletions

View file

@ -22,4 +22,4 @@ spec:
command:
- /bin/sh
- -c
- sleep 20 ; wget -O- -S --no-check-certificate https://{{ template "kyverno.serviceName" . }}:{{ .Values.service.port }}/health/liveness
- sleep 20 ; wget -O- -S --no-check-certificate https://{{ template "kyverno.serviceName" . }}.{{ template "kyverno.namespace" . }}:{{ .Values.service.port }}/health/liveness

View file

@ -23,5 +23,5 @@ spec:
command:
- /bin/sh
- -c
- sleep 20 ; wget -O- -S --no-check-certificate http://{{ template "kyverno.serviceName" . }}-metrics:{{ .Values.metricsService.port }}/metrics
- sleep 20 ; wget -O- -S --no-check-certificate http://{{ template "kyverno.serviceName" . }}-metrics.{{ template "kyverno.namespace" . }}:{{ .Values.metricsService.port }}/metrics
{{- end -}}

View file

@ -22,4 +22,4 @@ spec:
command:
- /bin/sh
- -c
- sleep 20 ; wget -O- -S --no-check-certificate https://{{ template "kyverno.serviceName" . }}:{{ .Values.service.port }}/health/readiness
- sleep 20 ; wget -O- -S --no-check-certificate https://{{ template "kyverno.serviceName" . }}.{{ template "kyverno.namespace" . }}:{{ .Values.service.port }}/health/readiness

View file

@ -0,0 +1,27 @@
{{- if and .Values.reportsController.enabled .Values.reportsController.metricsService.create -}}
apiVersion: v1
kind: Pod
metadata:
name: {{ template "kyverno.fullname" . }}-reports-controller-metrics
namespace: {{ template "kyverno.namespace" . }}
labels:
{{- include "kyverno.test.labels" . | nindent 4 }}
annotations:
{{- include "kyverno.test.annotations" . | nindent 4 }}
spec:
restartPolicy: Never
containers:
- name: test
image: {{ template "kyverno.test.image" . }}
imagePullPolicy: {{ template "kyverno.test.imagePullPolicy" . }}
{{- with .Values.test.resources }}
resources:
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
securityContext:
{{- include "kyverno.test.securityContext" . | nindent 8 }}
command:
- /bin/sh
- -c
- sleep 20 ; wget -O- -S --no-check-certificate http://{{ template "kyverno.reports-controller.name" . }}-metrics.{{ template "kyverno.namespace" . }}:{{ .Values.reportsController.metricsService.port }}/metrics
{{- end -}}