1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00
kyverno/charts/kyverno/templates/tests/reports-controller-metrics.yaml
Pradeep Lakshmi Narasimha e80a71c512
feature: Added test.imagePullSecrets config in values.yaml (#11180) (#11195)
Signed-off-by: Pradeep Lakshmi Narasimha <pradeep.vaishnav4@gmail.com>
2024-09-19 07:56:03 +00:00

33 lines
1.2 KiB
YAML

{{- 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
{{- with .Values.test.imagePullSecrets | default .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
containers:
- name: test
image: {{ template "kyverno.test.image" . }}
imagePullPolicy: {{ template "kyverno.test.imagePullPolicy" . }}
{{- with .Values.test.resources }}
resources:
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.test.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- -c
- sleep {{ .Values.test.sleep }} ; wget -O- -S --no-check-certificate http://{{ template "kyverno.reports-controller.name" . }}-metrics.{{ template "kyverno.namespace" . }}:{{ .Values.reportsController.metricsService.port }}/metrics
{{- end -}}